(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tid)
          op: Equal
          rhs: {(DQ ('disallow agent ptrace attach'))}
          spids: [7]
        )
      ]
      spids: [7]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {(have_prog)} {(uname)}) terminator:<Op_Semi ';'>)]
          action: [
            (Case
              to_match: 
                {
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(uname)})])
                    left_token: <Left_Backtick '`'>
                    spids: [26 28]
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(AIX)} {(CYGWIN) (Lit_Other '*')} {(OSF1)}]
                  action: [
                    (C {(echo)} {(DQ ('skipped (not supported on this platform)'))})
                    (C {(exit)} {(0)})
                  ]
                  spids: [33 39 54 -1]
                )
              ]
              spids: [24 30 57]
            )
          ]
          spids: [-1 21]
        )
      ]
      spids: [-1 59]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ (x) ($ VSub_Name '$USER'))} {(Lit_Other '=')} {(DQ (xroot))} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(echo)} {(DQ ('Skipped: running as root'))}) (C {(exit)} {(0)})]
          spids: [-1 80]
        )
      ]
      spids: [-1 94]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {(have_prog)} {(gdb)}) terminator:<Op_Semi ';'>)]
          action: [(C {(Lit_Other ':')} {(ok)})]
          spids: [-1 105]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('skipped (gdb not found)'))}) (C {(exit)} {(0)})]
      spids: [112 126]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {($ VSub_Name '$OBJ') (/setuid-allowed)} {(${ VSub_Name SSHAGENT)})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(Lit_Other ':')} {(ok)})]
          spids: [-1 140]
        )
      ]
      else_action: [
        (C {(echo)} 
          {(DQ ('skipped (') (${ VSub_Name SSHAGENT) (' is mounted on a no-setuid filesystem)'))}
        )
        (C {(exit)} {(0)})
      ]
      spids: [147 165]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$SUDO'))})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(echo)} {(DQ ('skipped (SUDO not set)'))}) (C {(exit)} {(0)})]
          spids: [-1 180]
        )
      ]
      else_action: [
        (C {($ VSub_Name '$SUDO')} {(chown)} {(0)} {(${ VSub_Name SSHAGENT)})
        (C {($ VSub_Name '$SUDO')} {(chgrp)} {(0)} {(${ VSub_Name SSHAGENT)})
        (C {($ VSub_Name '$SUDO')} {(chmod)} {(2755)} {(${ VSub_Name SSHAGENT)})
      ]
      spids: [194 229]
    )
    (C {(trace)} {(DQ ('start agent'))})
    (SimpleCommand
      words: [
        {(eval)}
        {
          (CommandSubPart
            command_list: (CommandList children:[(C {(${ VSub_Name SSHAGENT)} {(-s)})])
            left_token: <Left_Backtick '`'>
            spids: [240 246]
          )
        }
      ]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[248])]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{($ VSub_QMark '$?')} spids:[252])]
      spids: [252]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$r')} {(-ne)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(fail)} {(DQ ('could not start ssh-agent: exit code ') ($ VSub_Name '$r'))})]
          spids: [-1 268]
        )
      ]
      else_action: [
        (SimpleCommand
          words: [{(gdb)} {(${ VSub_Name SSHAGENT)} {(${ VSub_Name SSH_AGENT_PID)}]
          redirects: [
            (Redir
              op_id: Redir_Great
              fd: -1
              arg_word: {(${ VSub_Name OBJ) (/gdb.out)}
              spids: [295]
            )
            (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[302])
            (HereDoc
              op_id: Redir_DLess
              fd: -1
              body: {(DQ ('\t\tquit\n'))}
              do_expansion: True
              here_end: EOF
              was_filled: True
              spids: [305]
            )
          ]
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{($ VSub_QMark '$?')} spids:[312])]
          spids: [312]
        )
        (If
          arms: [
            (if_arm
              cond: [
                (Sentence
                  child: (C {(Lit_Other '[')} {($ VSub_Name '$r')} {(-ne)} {(0)} {(Lit_Other ']')})
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [(C {(fail)} {(DQ ('gdb failed: exit code ') ($ VSub_Name '$r'))})]
              spids: [-1 329]
            )
          ]
          spids: [-1 340]
        )
        (SimpleCommand
          words: [
            {(egrep)}
            {
              (SQ 
                <
'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task '
                >
              )
            }
            {(${ VSub_Name OBJ) (/gdb.out)}
          ]
          redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[349])]
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:r) op:Equal rhs:{($ VSub_QMark '$?')} spids:[358])]
          spids: [358]
        )
        (C {(rm)} {(-f)} {(${ VSub_Name OBJ) (/gdb.out)})
        (If
          arms: [
            (if_arm
              cond: [
                (Sentence
                  child: (C {(Lit_Other '[')} {($ VSub_Name '$r')} {(-ne)} {(0)} {(Lit_Other ']')})
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [(C {(fail)} {(DQ ('ptrace succeeded?: exit code ') ($ VSub_Name '$r'))})]
              spids: [-1 385]
            )
          ]
          spids: [-1 396]
        )
        (C {(trace)} {(DQ ('kill agent'))})
        (SimpleCommand
          words: [{(${ VSub_Name SSHAGENT)} {(-k)}]
          redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[413])]
        )
      ]
      spids: [278 417]
    )
  ]
)