(command.CommandList
  children: [
    (C {(typeset)} {(Lit_VarLike '_Dbg_bogus_file=') (SQ <' A really bogus file'>)})
    (C {(typeset)} {(-A)} {(_Dbg_file2canonic)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_Dbg_file2canonic)
          op: Equal
          rhs: {(sh_array_literal left:<Op_LParen '('>)}
        )
      ]
    )
    (C {(typeset)} {(-A)} {(_Dbg_fileinfo)})
    (C {(typeset)} {(-A)} {(_Dbg_filenames)})
    (command.ShFunction
      name: _Dbg_filecache_reset
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_filenames)
                  op: Equal
                  rhs: {(sh_array_literal left:<Op_LParen '('>)}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_fileinfo)
                  op: Equal
                  rhs: {(sh_array_literal left:<Op_LParen '('>)}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_file2canonic)
                  op: Equal
                  rhs: {(sh_array_literal left:<Op_LParen '('>)}
                )
              ]
            )
          ]
        )
    )
    (C {(_Dbg_filecache_reset)})
    (command.ShFunction
      name: _Dbg_check_line
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Arith_NEqual
                      left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 2)})
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
              ]
            )
            (C {(typeset)} {(-i)} {(Lit_VarLike 'line_number=') ($ VSub_Number '$1')})
            (C {(typeset)} {(Lit_VarLike 'filename=') (DQ ($ VSub_Number '$2'))})
            (C {(typeset)} {(-i)} {(max_line)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:max_line)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(_Dbg_get_maxline)} {(DQ ($ VSub_DollarName '$filename'))})]
                          )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_NEqual
                              left: (arith_expr.ArithWord w:{($ VSub_QMark '$?')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} 
                      {
                        (DQ ('internal error getting number of lines in ') 
                          ($ VSub_DollarName '$filename')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_Great
                              left: (arith_expr.VarRef token:<Lit_ArithVarLike line_number>)
                              right: (arith_expr.VarRef token:<Lit_ArithVarLike max_line>)
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DParen
                          child: (arith_expr.VarRef token:<Lit_ArithVarLike _Dbg_set_basename>)
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:filename)
                              op: Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <VSub_Name filename>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op_id: VOp1_DPound
                                        arg_word: {('*') (Lit_Slash /)}
                                      )
                                  )
                                }
                            )
                          ]
                        )
                      ]
                    )
                    (C {(_Dbg_errmsg)} 
                      {(DQ ('Line ') ($ VSub_DollarName '$line_number') (' is too large.'))} 
                      {
                        (DQ ('File ') ($ VSub_DollarName '$filename') (' has only ') 
                          ($ VSub_DollarName '$max_line') (' lines.')
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_file_not_read_in
      body: 
        (command.BraceGroup
          children: [
            (C {(typeset)} {(-r)} 
              {(Lit_VarLike 'filename=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(_Dbg_adjust_filename)} {(DQ ($ VSub_Number '$1'))})]
                    )
                )
              }
            )
            (C {(_Dbg_errmsg)} 
              {
                (DQ ('File ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) 
                  ($ VSub_DollarName '$filename') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (' not found in read-in files.')
                )
              }
            )
            (C {(_Dbg_errmsg)} {(DQ ("See 'info files' for a list of known files and"))})
            (C {(_Dbg_errmsg)} {(DQ ("'load' to read in a file."))})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_get_maxline
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Arith_NEqual
                      left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(-1)})
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_Dbg_set_source_array_var)} {(DQ ($ VSub_Number '$1'))})
                (command.ControlFlow
                  token: <ControlFlow_Return return>
                  arg_word: {($ VSub_QMark '$?')}
                )
              ]
            )
            (C {(typeset)} {(-r)} 
              {(Lit_VarLike 'line_count_cmd=') 
                (DQ ('line_count=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') 
                  ($ VSub_DollarName '$_Dbg_source_array_var') ('[@]}')
                )
              }
            )
            (C {(eval)} {($ VSub_DollarName '$line_count_cmd')})
            (C {(eval)} 
              {
                (DQ ('typeset last_line; last_line=') 
                  (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{') (${ VSub_Name _Dbg_source_array_var) ('[') ($ VSub_DollarName '$line_count') (']}')
                )
              }
            )
            (C {(typeset)} {(-i)} {(Lit_VarLike 'last_not_null=') (0)})
            (command.DParen
              child: 
                (arith_expr.BinaryAssign
                  op_id: Arith_Equal
                  left: (sh_lhs_expr.Name name:line_count)
                  right: 
                    (arith_expr.Binary
                      op_id: Arith_Minus
                      left: (arith_expr.VarRef token:<Lit_ArithVarLike line_count>)
                      right: (arith_expr.VarRef token:<Lit_ArithVarLike last_line_is_null>)
                    )
                )
            )
            (C {(echo)} {($ VSub_DollarName '$line_count')})
            (command.ControlFlow
              token: <ControlFlow_Return return>
              arg_word: {($ VSub_QMark '$?')}
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_get_source_line
      body: 
        (command.BraceGroup
          children: [
            (C {(typeset)} {(-i)} {(lineno)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_DEqual
                              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:lineno)
                          op: Equal
                          rhs: {($ VSub_DollarName '$_Dbg_frame_last_lineno')}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:lineno)
                      op: Equal
                      rhs: {($ VSub_Number '$1')}
                    )
                  ]
                )
                (C {(shift)})
              ]
            )
            (C {(typeset)} {(filename)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_DEqual
                              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:filename)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$_Dbg_frame_last_filename'))}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:filename)
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                    )
                  ]
                )
              ]
            )
            (C {(_Dbg_readin_if_new)} {(DQ ($ VSub_DollarName '$filename'))})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Op_DAmp]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: BoolUnary_n
                                  child: {($ VSub_DollarName '$_Dbg_set_highlight')}
                                )
                            )
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: BoolUnary_n
                                  child: {($ VSub_DollarName '$_Dbg_highlight_array_var')}
                                )
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(eval)} 
                      {
                        (DQ ('typeset -i count=') 
                          (word_part.EscapedLiteral
                            token: <Lit_EscapedChar '\\$'>
                          ) ('{#') ($ VSub_DollarName '$_Dbg_highlight_array_var') ('[@]}')
                        )
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DParen
                                  child: (arith_expr.VarRef token:<Lit_ArithVarLike count>)
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(eval)} 
                              {
                                (DQ ('_Dbg_source_line=') 
                                  (word_part.EscapedLiteral
                                    token: <Lit_EscapedChar '\\$'>
                                  ) ('{') ($ VSub_DollarName '$_Dbg_highlight_array_var') ('[lineno]}')
                                )
                              }
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (C {(eval)} 
                          {
                            (DQ ('_Dbg_source_line=') 
                              (word_part.EscapedLiteral
                                token: <Lit_EscapedChar '\\$'>
                              ) ('{') ($ VSub_DollarName '$_Dbg_source_array_var') ('[') ($ VSub_DollarName '$lineno') (']}')
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(eval)} 
                  {
                    (DQ ('_Dbg_source_line=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) 
                      ('{') ($ VSub_DollarName '$_Dbg_source_array_var') ('[') ($ VSub_DollarName '$lineno') (']}')
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_is_file
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_DEqual
                              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} {(DQ ('Internal debug error _Dbg_is_file(): null file to find'))})
                    (C {(echo)} {(SQ )})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (C {(typeset)} {(Lit_VarLike 'find_file=') (DQ ($ VSub_Number '$1'))})
            (C {(typeset)} {(try_find_file)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_z
                              child: {($ VSub_DollarName '$find_file')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} 
                      {(DQ ('Internal debug error _Dbg_is_file(): file argument null'))}
                    )
                    (C {(echo)} {(SQ )})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (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 find_file>
                                    suffix_op: 
                                      (suffix_op.Slice
                                        begin: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                                        length: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                      )
                                  )
                                }
                              right: {(SQ </>)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:try_find_file)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(_Dbg_expand_filename)} 
                                        {(DQ ($ VSub_DollarName '$find_file'))}
                                      )
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Unary
                                      op_id: BoolUnary_n
                                      child: 
                                        {
                                          (braced_var_sub
                                            token: <VSub_Name _Dbg_filenames>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithWord
                                                    w: {($ VSub_DollarName '$try_find_file')}
                                                  )
                                              )
                                          )
                                        }
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} {(DQ ($ VSub_DollarName '$try_find_file'))})
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (braced_var_sub
                                    token: <VSub_Name find_file>
                                    suffix_op: 
                                      (suffix_op.Slice
                                        begin: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                                        length: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                      )
                                  )
                                }
                              right: {(SQ <.>)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:try_find_file)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(_Dbg_expand_filename)} 
                                        {
                                          (DQ (${ VSub_Name _Dbg_init_cwd) (/) 
                                            ($ VSub_DollarName '$find_file')
                                          )
                                        }
                                      )
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Unary
                                      op_id: BoolUnary_n
                                      child: 
                                        {
                                          (braced_var_sub
                                            token: <VSub_Name _Dbg_filenames>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithWord
                                                    w: {($ VSub_DollarName '$try_find_file')}
                                                  )
                                              )
                                          )
                                        }
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} {(DQ ($ VSub_DollarName '$try_find_file'))})
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(typeset)} {(-i)} 
                  {(Lit_VarLike 'n=') 
                    (braced_var_sub
                      token: <VSub_Name _Dbg_dir>
                      prefix_op: VSub_Pound
                      bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                    )
                  }
                )
                (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 n>)
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Node_PostDPlus
                      child: (sh_lhs_expr.Name name:i)
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (C {(typeset)} 
                          {(Lit_VarLike 'basename=') 
                            (DQ 
                              (braced_var_sub
                                token: <VSub_Name _Dbg_dir>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.VarRef token:<Lit_ArithVarLike i>)
                                  )
                              )
                            )
                          }
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: BoolBinary_GlobDEqual
                                          left: {($ VSub_DollarName '$basename')}
                                          right: {(SQ <'\\$cdir'>)}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:basename)
                                      op: Equal
                                      rhs: {($ VSub_DollarName '$_Dbg_cdir')}
                                    )
                                  ]
                                )
                              ]
                            )
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: BoolBinary_GlobDEqual
                                          left: {($ VSub_DollarName '$basename')}
                                          right: {(SQ <'\\$cwd'>)}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:basename)
                                      op: Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [(C {(pwd)})]
                                              )
                                          )
                                        }
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:try_find_file)
                              op: Equal
                              rhs: 
                                {
                                  (DQ ($ VSub_DollarName '$basename') (/) 
                                    ($ VSub_DollarName '$find_file')
                                  )
                                }
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Unary
                                          op_id: BoolUnary_f
                                          child: {(DQ ($ VSub_DollarName '$try_find_file'))}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (C {(echo)} {(DQ ($ VSub_DollarName '$try_find_file'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
            )
            (C {(echo)} {(SQ )})
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_readin
      body: 
        (command.BraceGroup
          children: [
            (C {(typeset)} {(filename)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_NEqual
                              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:filename)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(_Dbg_frame_file)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:filename)
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$_Dbg_frame_filename'))}
                    )
                  ]
                )
              ]
            )
            (C {(typeset)} {(-i)} {(Lit_VarLike 'line_count=') (0)})
            (command.Sentence
              child: (C {(typeset)} {(-i)} {(next)})
              terminator: <Op_Semi ';'>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:next)
                  op: Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <VSub_Name _Dbg_filenames>
                        prefix_op: VSub_Pound
                        bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                      )
                    }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_source_array_var)
                  op: Equal
                  rhs: {(DQ (_Dbg_source_) (${ VSub_Name next))}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_n
                              child: {($ VSub_DollarName '$_Dbg_set_highlight')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_Dbg_highlight_array_var)
                          op: Equal
                          rhs: {(DQ (_Dbg_highlight_) (${ VSub_Name next))}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (C {(typeset)} {(filevar)})
            (C {(typeset)} {(source_array)})
            (C {(typeset)} {(-ri)} {(Lit_VarLike 'NOT_SMALLFILE=') (1000)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: BoolUnary_z
                                  child: {($ VSub_DollarName '$filename')}
                                )
                            )
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_DollarName '$filename')}
                                  right: {(DQ ($ VSub_DollarName '$_Dbg_bogus_file'))}
                                )
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(eval)} 
                      {
                        (DQ (${ VSub_Name _Dbg_source_array_var) ('[0]=') 
                          (word_part.EscapedLiteral
                            token: <Lit_EscapedChar '\\"'>
                          ) ($ VSub_DollarName '$Dbg_EXECUTION_STRING') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>)
                        )
                      }
                    )
                  ]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fullname)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(_Dbg_resolve_expand_filename)} 
                                    {(DQ ($ VSub_DollarName '$filename'))}
                                  )
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: BoolUnary_r
                                  child: {($ VSub_DollarName '$fullname')}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (C {(typeset)} {(-r)} 
                          {(Lit_VarLike 'progress_prefix=') 
                            (DQ ('Reading ') ($ VSub_DollarName '$filename'))
                          }
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: 
                                (sh_lhs_expr.IndexedName
                                  name: _Dbg_file2canonic
                                  index: (arith_expr.ArithWord w:{($ VSub_DollarName '$filename')})
                                )
                              op: Equal
                              rhs: {(DQ ($ VSub_DollarName '$fullname'))}
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: 
                                (sh_lhs_expr.IndexedName
                                  name: _Dbg_file2canonic
                                  index: (arith_expr.ArithWord w:{($ VSub_DollarName '$fullname')})
                                )
                              op: Equal
                              rhs: {(DQ ($ VSub_DollarName '$fullname'))}
                            )
                          ]
                        )
                        (C {(typeset)} {(-ri)} {(Lit_VarLike 'BIGFILE=') (30000)})
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      words: [{(wc)} {(-l)}]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_Less '<'>
                                          fd: 16777215
                                          arg_word: {(/dev/null)}
                                        )
                                        (redir.Redir
                                          op: <Redir_Great '>'>
                                          fd: 16777215
                                          arg_word: {(/dev/null)}
                                        )
                                        (redir.Redir
                                          op: <Redir_GreatAnd '2>&'>
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:line_count)
                                      op: Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (command.Simple
                                                    words: [{(wc)} {(-l)}]
                                                    redirects: [
                                                      (redir.Redir
                                                        op: <Redir_Less '<'>
                                                        fd: 16777215
                                                        arg_word: {(DQ (${ VSub_Name fullname))}
                                                      )
                                                    ]
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (command.DParen
                                              child: 
                                                (arith_expr.Binary
                                                  op_id: Arith_GreatEqual
                                                  left: 
                                                    (arith_expr.VarRef
                                                      token: <Lit_ArithVarLike line_count>
                                                    )
                                                  right: 
                                                    (arith_expr.VarRef
                                                      token: <Lit_ArithVarLike NOT_SMALLFILE>
                                                    )
                                                )
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [
                                        (C {(_Dbg_msg_nocr)} {(DQ (${ VSub_Name progress_prefix) (' '))})
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                        (command.Simple
                          words: [
                            {(builtin)}
                            {(readarray)}
                            {(-t)}
                            {(-O)}
                            {(1)}
                            {(-c)}
                            {($ VSub_DollarName '$BIGFILE')}
                            {(-C)}
                            {
                              (DQ ('_Dbg_progess_show ') 
                                (word_part.EscapedLiteral
                                  token: <Lit_EscapedChar '\\"'>
                                ) (${ VSub_Name progress_prefix) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (' ') 
                                (${ VSub_Name line_count)
                              )
                            }
                            {($ VSub_DollarName '$_Dbg_source_array_var')}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Less '<'>
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_DollarName '$fullname'))}
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Unary
                                          op_id: BoolUnary_n
                                          child: {($ VSub_DollarName '$_Dbg_set_highlight')}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:opts)
                                      op: Equal
                                      rhs: {(DQ ('--bg=') (${ VSub_Name _Dbg_set_highlight))}
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.Unary
                                                  op_id: BoolUnary_n
                                                  child: {($ VSub_DollarName '$_Dbg_set_style')}
                                                )
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:opts)
                                              op: Equal
                                              rhs: {(DQ ('--style=') (${ VSub_Name _Dbg_set_style))}
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:highlight_cmd)
                                      op: Equal
                                      rhs: 
                                        {
                                          (DQ (${ VSub_Name _Dbg_libdir) ('/lib/term-highlight.py ') 
                                            ($ VSub_DollarName '$opts') (' ') ($ VSub_DollarName '$fullname')
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:tempfile)
                                      op: Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (command.Simple
                                                    words: [{($ VSub_DollarName '$highlight_cmd')}]
                                                    redirects: [
                                                      (redir.Redir
                                                        op: <Redir_Great '2>'>
                                                        fd: 2
                                                        arg_word: {(/dev/null)}
                                                      )
                                                    ]
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (command.DParen
                                              child: 
                                                (arith_expr.Binary
                                                  op_id: Arith_DEqual
                                                  left: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                                                  right: (arith_expr.ArithWord w:{($ VSub_QMark '$?')})
                                                )
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [
                                        (command.Simple
                                          words: [
                                            {(builtin)}
                                            {(readarray)}
                                            {(-t)}
                                            {(-O)}
                                            {(1)}
                                            {(-c)}
                                            {($ VSub_DollarName '$BIGFILE')}
                                            {(-C)}
                                            {
                                              (DQ ('_Dbg_progess_show ') 
                                                (word_part.EscapedLiteral
                                                  token: <Lit_EscapedChar '\\"'>
                                                ) (${ VSub_Name progress_prefix) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (' ') 
                                                (${ VSub_Name line_count)
                                              )
                                            }
                                            {($ VSub_DollarName '$_Dbg_highlight_array_var')}
                                          ]
                                          redirects: [
                                            (redir.Redir
                                              op: <Redir_Less '<'>
                                              fd: 16777215
                                              arg_word: {(DQ ($ VSub_DollarName '$tempfile'))}
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Op_DAmp]
                                  children: [
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Unary
                                          op_id: BoolUnary_r
                                          child: {($ VSub_DollarName '$tempfile')}
                                        )
                                    )
                                    (C {(rm)} {($ VSub_DollarName '$tempfile')})
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                        (command.AndOr
                          ops: [Op_DAmp]
                          children: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Arith_Great
                                  left: (arith_expr.VarRef token:<Lit_ArithVarLike line_count>)
                                  right: (arith_expr.VarRef token:<Lit_ArithVarLike BIGFILE>)
                                )
                            )
                            (C {(_Dbg_progess_done)})
                          ]
                        )
                      ]
                    )
                  ]
                  else_action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})]
                )
              ]
            )
            (C {(typeset)} {(-r)} 
              {(Lit_VarLike 'line_count_cmd=') 
                (DQ ('line_count=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('{#') 
                  (braced_var_sub
                    token: <VSub_Name _Dbg_source_array_var>
                    bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                  ) ('}')
                )
              }
            )
            (C {(eval)} {($ VSub_DollarName '$line_count_cmd')})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Arith_GreatEqual
                      left: (arith_expr.VarRef token:<Lit_ArithVarLike line_count>)
                      right: (arith_expr.VarRef token:<Lit_ArithVarLike NOT_SMALLFILE>)
                    )
                )
                (C {(_Dbg_msg)} {(DQ (done.))})
              ]
            )
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: 
                        (sh_lhs_expr.IndexedName
                          name: _Dbg_filenames
                          index: (arith_expr.ArithWord w:{($ VSub_DollarName '$fullname')})
                        )
                      op: Equal
                      rhs: {($ VSub_DollarName '$_Dbg_source_array_var')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_readin_if_new
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Arith_NEqual
                      left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
              ]
            )
            (C {(typeset)} {(Lit_VarLike 'filename=') (DQ ($ VSub_Number '$1'))})
            (C {(_Dbg_set_source_array_var)} {(DQ ($ VSub_DollarName '$filename'))})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_z
                              child: {(DQ ($ VSub_DollarName '$fullname'))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(_Dbg_readin)} {(DQ ($ VSub_DollarName '$filename'))})
                    (C {(typeset)} {(Lit_VarLike 'rc=') ($ VSub_QMark '$?')})
                    (C {(KW_Set set)} {(Lit_Other '+') (xv)})
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_NEqual
                              left: (arith_expr.ArithWord w:{($ VSub_QMark '$?')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {($ VSub_DollarName '$rc')}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_z
                              child: {($ VSub_DollarName '$fullname')}
                            )
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(_Dbg_set_source_array_var)} {(DQ ($ VSub_DollarName '$filename'))})
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {($ VSub_QMark '$?')}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_set_source_array_var
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Arith_NEqual
                      left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
              ]
            )
            (C {(typeset)} {(Lit_VarLike 'filename=') (DQ ($ VSub_Number '$1'))})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: (bool_expr.Unary op_id:BoolUnary_z child:{($ VSub_DollarName '$filename')})
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(2)})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:fullname)
                  op: Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <VSub_Name _Dbg_file2canonic>
                        bracket_op: 
                          (bracket_op.ArrayIndex
                            expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$filename')})
                          )
                      )
                    }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (command.DBracket
                  expr: (bool_expr.Unary op_id:BoolUnary_z child:{($ VSub_DollarName '$fullname')})
                )
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: BoolUnary_n
                      child: 
                        {
                          (braced_var_sub
                            token: <VSub_Name _Dbg_filenames>
                            bracket_op: 
                              (bracket_op.ArrayIndex
                                expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$filename')})
                              )
                          )
                        }
                    )
                )
                (command.BraceGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:fullname)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$filename'))}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: (bool_expr.Unary op_id:BoolUnary_z child:{($ VSub_DollarName '$fullname')})
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(2)})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_source_array_var)
                  op: Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <VSub_Name _Dbg_filenames>
                        bracket_op: 
                          (bracket_op.ArrayIndex
                            expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fullname')})
                          )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: BoolUnary_n
                              child: {($ VSub_DollarName '$_Dbg_set_highlight')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_Dbg_highlight_array_var)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <VSub_Name _Dbg_source_array_var>
                                  suffix_op: 
                                    (suffix_op.PatSub
                                      pat: {(_Dbg_source_)}
                                      replace: {(_Dbg_highlight_)}
                                      replace_mode: Undefined_Tok
                                    )
                                )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_source_array_var)
                  op: Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <VSub_Name _Dbg_filenames>
                        bracket_op: 
                          (bracket_op.ArrayIndex
                            expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$fullname')})
                          )
                      )
                    }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: BoolUnary_z
                      child: {($ VSub_DollarName '$_Dbg_source_array_var')}
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(2)})
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
  ]
)