(command.CommandList
  children: [
    (C {<_Dbg_help_add_sub>} {<set>} {<tty>} 
      {
        (SQ <'set tty {pseudo-device|&1}\n'> <'\n'> 
          <'Set the output device for debugger output. Use "\\&1" if you want debugger\n'> <'output to go to STDOUT.\n'>
        )
      } {<1>}
    )
    (command.ShFunction
      name: _Dbg_do_set_tty
      body: 
        (BraceGroup
          children: [
            (C {<_Dbg_do_tty>} {($ Id.VSub_At '$@')})
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_do_set_help_tty
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<label>})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_Number '$1')})
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:label)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: (C {<builtin>} {<printf>} {(SQ <'%-16s-- '>)} {(SQ <'set tty'>)})
                          )
                        }
                      spids: [178]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:label)
                      op: assign_op.Equal
                      rhs: {(SQ )}
                      spids: [195]
                    )
                  ]
                )
              ]
            )
            (C {<_Dbg_msg_nocr>} {(DQ (${ Id.VSub_Name label) <'Debugger output goes to '>)})
            (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 '$_Dbg_tty')}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<_Dbg_msg>} 
                      {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<tty>}))}
                    )
                  ]
                  spids: [212 224]
                )
              ]
              else_action: [(C {<_Dbg_msg>} {($ Id.VSub_DollarName '$_Dbg_tty')})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
  ]
)