(command.CommandList
  children: [
    (C {<_Dbg_help_add_sub>} {<show>} {<tty>} {(DQ <'Show tty used for debugger output'>)} {<1>})
    (command.ShFunction
      name: _Dbg_do_show_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 <'%-12s: '>)} {(SQ <'show tty'>)})
                          )
                        }
                      spids: [94]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:label)
                      op: assign_op.Equal
                      rhs: {(SQ )}
                      spids: [111]
                    )
                  ]
                )
              ]
            )
            (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: [128 140]
                )
              ]
              else_action: [(C {<_Dbg_msg>} {($ Id.VSub_DollarName '$_Dbg_tty')})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
  ]
)