(CommandList
  children: [
    (C {(_Dbg_help_add)} {(tty)} 
      {
        (SQ <"tty\n"> <"\n"> 
          <"Set the output device for debugger output. Use \"&1\" if you want debugger\n"> <"output to go to STDOUT.\n">
        )
      }
    )
    (FuncDef
      name: _Dbg_do_tty
      body: 
        (BraceGroup
          children: [
            (C {(typeset)} {(-i)} {(Lit_VarLike "rc=") (0)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_Less
                              left: (ArithWord w:{($ VSub_Pound "$#")})
                              right: (ArithWord w:{(Lit_Digits 1)})
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} 
                      {(DQ ("Argument required (terminal name for running target process)."))}
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                  ]
                  spids: [-1 104]
                )
              ]
              spids: [-1 119]
            )
            (C {(typeset)} {(Lit_VarLike "tty=") ($ VSub_Number "$1")})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(_Dbg_check_tty)} {($ VSub_Name "$tty")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:_Dbg_tty)
                          op: Equal
                          rhs: {($ VSub_Name "$tty")}
                          spids: [140]
                        )
                      ]
                      spids: [140]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:_Dbg_prompt_output)
                          op: Equal
                          rhs: {($ VSub_Name "$_Dbg_tty")}
                          spids: [144]
                        )
                      ]
                      spids: [144]
                    )
                    (C {(_Dbg_msg)} {(DQ ("Debugger output set to go to ") ($ VSub_Name "$_Dbg_tty"))})
                  ]
                  spids: [-1 136]
                )
              ]
              spids: [-1 156]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [78]
        )
      spids: [74 77]
    )
  ]
)