(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      left: <Id.KW_DLeftBracket '[['>
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobNEqual
                          left: {($ Id.VSub_Pound '#')}
                          right: {<2>}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'Usage '> ($ Id.VSub_Number 0) <' BASH_PROGRAM PREFIX'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<3>})
          ]
          spids: [3 16]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SH_PROG='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SH_PROG='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SH_PROG='> name:SH_PROG)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PREFIX='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PREFIX='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PREFIX='> name:PREFIX)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 2)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <typeset>
      more_env: []
      words: [{<typeset>} {<-i>} {<Id.Lit_VarLike 'rc='> <0>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'bash_loc='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'bash_loc='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bash_loc='> name:bash_loc)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <Id.VSub_DollarName '$SH_PROG'>
                    more_env: []
                    words: [{($ Id.VSub_DollarName SH_PROG)} {<-c>} {(SQ <'echo ${SHELL}'>)}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'rc='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'rc='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '?')}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DParen
                      left: <Id.Op_DLeftParen _>
                      child: 
                        (arith_expr.Binary
                          op_id: Id.Arith_NEqual
                          left: ($ Id.Lit_ArithVarLike rc)
                          right: {<Id.Lit_Digits 0>}
                        )
                      right: <Id.Op_DRightParen _>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Something went wrong in getting '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'SHELL for '> ($ Id.VSub_DollarName SH_PROG)
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow
              keyword: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName rc)}
            )
          ]
          spids: [64 79]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      left: <Id.KW_DLeftBracket '[['>
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: {($ Id.VSub_DollarName bash_loc)}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Something went wrong in setting bash location from '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'SHELL for '> ($ Id.VSub_DollarName SH_PROG)
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<3>})
          ]
          spids: [101 113]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'bashdb_main='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'bashdb_main='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bashdb_main='> name:bashdb_main)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Pipeline
                    children: [
                      (command.Simple
                        blame_tok: <strings>
                        more_env: []
                        words: [{<strings>} {($ Id.VSub_DollarName SH_PROG)}]
                        redirects: []
                        do_fork: T
                      )
                      (command.Simple
                        blame_tok: <grep>
                        more_env: []
                        words: [{<grep>} {<bashdb>}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                    ops: [<Id.Op_Pipe _>]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'check_loc='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'check_loc='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'check_loc='> name:check_loc)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <dirname>
                    more_env: []
                    words: [
                      {<dirname>}
                      {
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <dirname>
                              more_env: []
                              words: [{<dirname>} {($ Id.VSub_DollarName bashdb_main)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      }
                    ]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      left: <Id.KW_DLeftBracket '[['>
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobNEqual
                          left: {($ Id.VSub_DollarName PREFIX)}
                          right: {($ Id.VSub_DollarName check_loc)}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'bash says prefix should be '> ($ Id.VSub_DollarName check_loc) <'. You gave '> 
                    ($ Id.VSub_DollarName PREFIX)
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<4>})
          ]
          spids: [159 173]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)