(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_POSIX2_VERSION)
          op: assign_op.Equal
          rhs: {<199209>}
          spids: [14]
        )
      ]
    )
    (C {<export>} {<_POSIX2_VERSION>})
    (command.Case
      to_match: 
        {
          (command_sub
            left_token: <Id.Left_Backtick '`'>
            child: 
              (command.Simple
                words: [{<uname>} {<-s>}]
                redirects: [
                  (redir
                    op: <Id.Redir_Great '2>'>
                    loc: (redir_loc.Fd fd:2)
                    arg: {<'/dev/null'>}
                  )
                ]
                do_fork: T
              )
          )
        }
      arms: [
        (case_arm
          pat_list: [{<OSF1> <Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BIN_SH)
                  op: assign_op.Equal
                  rhs: {<xpg4>}
                  spids: [42]
                )
              ]
            )
            (C {<export>} {<BIN_SH>})
          ]
          spids: [37 39 51 -1]
        )
        (case_arm
          pat_list: [{<CYGWIN_NT-5.0>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:os)
                  op: assign_op.Equal
                  rhs: {<cygwin>}
                  spids: [57]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TEST_SSH_IPV6)
                  op: assign_op.Equal
                  rhs: {<no>}
                  spids: [61]
                )
              ]
            )
          ]
          spids: [53 54 65 -1]
        )
        (case_arm
          pat_list: [{<CYGWIN> <Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:os)
                  op: assign_op.Equal
                  rhs: {<cygwin>}
                  spids: [72]
                )
              ]
            )
          ]
          spids: [67 69 76 -1]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$TEST_SSH_PORT'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PORT)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$TEST_SSH_PORT'))}
                  spids: [99]
                )
              ]
            )
          ]
          spids: [81 96]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:PORT)
              op: assign_op.Equal
              rhs: {<4242>}
              spids: [107]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/ucb/whoami'>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:USER)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<'/usr/ucb/whoami'>}))}
                  spids: [127]
                )
              ]
            )
          ]
          spids: [113 124]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [{<whoami>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:USER)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<whoami>}))}
                  spids: [148]
                )
              ]
            )
          ]
          spids: [134 145]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [{<logname>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:USER)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<logname>}))}
                  spids: [169]
                )
              ]
            )
          ]
          spids: [155 166]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:USER)
              op: assign_op.Equal
              rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<id>} {<-un>}))}
              spids: [179]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OBJ)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [191]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$OBJ'))} 
                      {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(SQ <'$OBJ not defined'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
          ]
          spids: [194 212]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {($ Id.VSub_DollarName '$OBJ')} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'not a directory: '> ($ Id.VSub_DollarName '$OBJ'))})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
          ]
          spids: [228 241]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCRIPT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$2')}
          spids: [258]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$SCRIPT'))} 
                      {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(SQ <'$SCRIPT not defined'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
          ]
          spids: [261 279]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                      {($ Id.VSub_DollarName '$SCRIPT')} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'not a file: '> ($ Id.VSub_DollarName '$SCRIPT'))})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
          ]
          spids: [295 308]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {($ Id.VSub_DollarName '$TEST_SHELL')} {<-n>} {($ Id.VSub_DollarName '$SCRIPT')})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<true>})]
          spids: [325 334]
        )
      ]
      else_action: [
        (C {<echo>} {(DQ <'syntax error in '> ($ Id.VSub_DollarName '$SCRIPT'))})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})
      ]
    )
    (C {<unset>} {<SSH_AUTH_SOCK>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SRC)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<dirname>} {(${ Id.VSub_Name SCRIPT)})
              )
            }
          spids: [361]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSH)
          op: assign_op.Equal
          rhs: {<ssh>}
          spids: [376]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHD)
          op: assign_op.Equal
          rhs: {<sshd>}
          spids: [379]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHAGENT)
          op: assign_op.Equal
          rhs: {<ssh-agent>}
          spids: [382]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHADD)
          op: assign_op.Equal
          rhs: {<ssh-add>}
          spids: [385]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHKEYGEN)
          op: assign_op.Equal
          rhs: {<ssh-keygen>}
          spids: [388]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHKEYSCAN)
          op: assign_op.Equal
          rhs: {<ssh-keyscan>}
          spids: [391]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTP)
          op: assign_op.Equal
          rhs: {<sftp>}
          spids: [394]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTPSERVER)
          op: assign_op.Equal
          rhs: {<'/usr/libexec/openssh/sftp-server'>}
          spids: [397]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCP)
          op: assign_op.Equal
          rhs: {<scp>}
          spids: [400]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PLINK)
          op: assign_op.Equal
          rhs: {<plink>}
          spids: [407]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PUTTYGEN)
          op: assign_op.Equal
          rhs: {<puttygen>}
          spids: [410]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CONCH)
          op: assign_op.Equal
          rhs: {<conch>}
          spids: [413]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSH'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSH)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSH))}
                  spids: [439]
                )
              ]
            )
          ]
          spids: [417 436]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSHD'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHD)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSHD))}
                  spids: [470]
                )
              ]
            )
          ]
          spids: [448 467]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSHAGENT'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHAGENT)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSHAGENT))}
                  spids: [501]
                )
              ]
            )
          ]
          spids: [479 498]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSHADD'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHADD)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSHADD))}
                  spids: [532]
                )
              ]
            )
          ]
          spids: [510 529]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSHKEYGEN'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHKEYGEN)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSHKEYGEN))}
                  spids: [563]
                )
              ]
            )
          ]
          spids: [541 560]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SSHKEYSCAN'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHKEYSCAN)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SSHKEYSCAN))}
                  spids: [594]
                )
              ]
            )
          ]
          spids: [572 591]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SFTP'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SFTP)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SFTP))}
                  spids: [625]
                )
              ]
            )
          ]
          spids: [603 622]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SFTPSERVER'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SFTPSERVER)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SFTPSERVER))}
                  spids: [656]
                )
              ]
            )
          ]
          spids: [634 653]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_SCP'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SCP)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_SCP))}
                  spids: [687]
                )
              ]
            )
          ]
          spids: [665 684]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_PLINK'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name TEST_SSH_PLINK))}
              arms: [
                (case_arm
                  pat_list: [{<'/'> <Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PLINK)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name TEST_SSH_PLINK))}
                          spids: [737]
                        )
                      ]
                    )
                  ]
                  spids: [733 735 744 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PLINK)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Simple
                                    words: [{<which>} {(${ Id.VSub_Name TEST_SSH_PLINK)}]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            }
                          spids: [750]
                        )
                      ]
                    )
                  ]
                  spids: [747 748 764 -1]
                )
              ]
            )
          ]
          spids: [696 715]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_PUTTYGEN'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name TEST_SSH_PUTTYGEN))}
              arms: [
                (case_arm
                  pat_list: [{<'/'> <Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PUTTYGEN)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name TEST_SSH_PUTTYGEN))}
                          spids: [812]
                        )
                      ]
                    )
                  ]
                  spids: [808 810 819 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PUTTYGEN)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Simple
                                    words: [{<which>} {(${ Id.VSub_Name TEST_SSH_PUTTYGEN)}]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            }
                          spids: [825]
                        )
                      ]
                    )
                  ]
                  spids: [822 823 839 -1]
                )
              ]
            )
          ]
          spids: [771 790]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_CONCH'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name TEST_SSH_CONCH))}
              arms: [
                (case_arm
                  pat_list: [{<'/'> <Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CONCH)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Name TEST_SSH_CONCH))}
                          spids: [887]
                        )
                      ]
                    )
                  ]
                  spids: [883 885 894 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CONCH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Simple
                                    words: [{<which>} {(${ Id.VSub_Name TEST_SSH_CONCH)}]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            }
                          spids: [900]
                        )
                      ]
                    )
                  ]
                  spids: [897 898 914 -1]
                )
              ]
            )
          ]
          spids: [846 865]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSH_PROTOCOLS)
          op: assign_op.Equal
          rhs: {<2>}
          spids: [922]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_PROTOCOLS'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSH_PROTOCOLS)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name TEST_SSH_PROTOCOLS))}
                  spids: [950]
                )
              ]
            )
          ]
          spids: [928 947]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_DollarName '$SSHD'))}
      arms: [
        (case_arm pat_list:[{<'/'> <Id.Lit_Star '*'>}] spids:[971 973 975 -1])
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHD)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<which>} {($ Id.VSub_DollarName '$SSHD')})
                      )
                    }
                  spids: [980]
                )
              ]
            )
          ]
          spids: [977 978 989 -1]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_DollarName '$SSHAGENT'))}
      arms: [
        (case_arm pat_list:[{<'/'> <Id.Lit_Star '*'>}] spids:[1002 1004 1006 -1])
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSHAGENT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<which>} {($ Id.VSub_DollarName '$SSHAGENT')})
                      )
                    }
                  spids: [1011]
                )
              ]
            )
          ]
          spids: [1008 1009 1020 -1]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSH_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSH)}
          spids: [1028]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHD_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSHD)}
          spids: [1033]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHAGENT_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSHAGENT)}
          spids: [1038]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHADD_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSHADD)}
          spids: [1043]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHKEYGEN_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSHKEYGEN)}
          spids: [1048]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHKEYSCAN_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SSHKEYSCAN)}
          spids: [1053]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTP_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SFTP)}
          spids: [1058]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTPSERVER_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SFTPSERVER)}
          spids: [1063]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCP_BIN)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name SCP)}
          spids: [1068]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$USE_VALGRIND'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName '$OBJ') <'/valgrind-out'>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:VG_TEST)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$SCRIPT')} {<.sh>})
                      )
                    }
                  spids: [1104]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$VG_TEST'))}
              arms: [
                (case_arm
                  pat_list: [{<connect-privsep>} {<reexec>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_SKIP)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [1136]
                        )
                      ]
                    )
                  ]
                  spids: [1130 1133 1139 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<x> (DQ ($ Id.VSub_DollarName '$VG_SKIP'))} 
                              {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_IGNORE)
                          op: assign_op.Equal
                          rhs: {(DQ <'/bin/*,/sbin/*,/usr/*,/var/*'>)}
                          spids: [1167]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_LOG)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$OBJ') <'/valgrind-out/'> 
                                (${ Id.VSub_Name VG_TEST) <.>
                              )
                            }
                          spids: [1173]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_OPTS)
                          op: assign_op.Equal
                          rhs: {(DQ <'--track-origins=yes --leak-check=full'>)}
                          spids: [1184]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_OPTS)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$VG_OPTS') <' --trace-children=yes'>)}
                          spids: [1190]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_OPTS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG_OPTS') <' --trace-children-skip='> 
                                (${ Id.VSub_Name VG_IGNORE)
                              )
                            }
                          spids: [1197]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG_PATH)
                          op: assign_op.Equal
                          rhs: {(DQ <valgrind>)}
                          spids: [1207]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {(DQ <x> ($ Id.VSub_DollarName '$VALGRIND_PATH'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:VG_PATH)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$VALGRIND_PATH'))}
                                  spids: [1235]
                                )
                              ]
                            )
                          ]
                          spids: [1213 1232]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VG)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG_PATH') <' '> 
                                ($ Id.VSub_DollarName '$VG_OPTS')
                              )
                            }
                          spids: [1244]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'ssh.%p '> ($ Id.VSub_DollarName '$SSH')
                              )
                            }
                          spids: [1252]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSHD)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'sshd.%p '> ($ Id.VSub_DollarName '$SSHD')
                              )
                            }
                          spids: [1264]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSHAGENT)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'ssh-agent.%p '> ($ Id.VSub_DollarName '$SSHAGENT')
                              )
                            }
                          spids: [1276]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSHADD)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'ssh-add.%p '> ($ Id.VSub_DollarName '$SSHADD')
                              )
                            }
                          spids: [1288]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSHKEYGEN)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'ssh-keygen.%p '> ($ Id.VSub_DollarName '$SSHKEYGEN')
                              )
                            }
                          spids: [1300]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SSHKEYSCAN)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'ssh-keyscan.%p '> ($ Id.VSub_DollarName '$SSHKEYSCAN')
                              )
                            }
                          spids: [1312]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SFTP)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'sftp.%p '> (${ Id.VSub_Name SFTP)
                              )
                            }
                          spids: [1324]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SCP)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$VG') <' --log-file='> 
                                (${ Id.VSub_Name VG_LOG) <'scp.%p '> ($ Id.VSub_DollarName '$SCP')
                              )
                            }
                          spids: [1338]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{<cat>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {($ Id.VSub_DollarName '$OBJ') <'/valgrind-sftp-server.sh'>}
                        )
                        (redir
                          op: <Id.Redir_DLess '<<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: 
                            (redir_param.HereDoc
                              here_begin: {<EOF>}
                              here_end_span_id: 1377
                              stdin_parts: [
                                <'#!/bin/sh\n'>
                                <'exec '>
                                ($ Id.VSub_DollarName '$VG')
                                <' --log-file='>
                                (${ Id.VSub_Name VG_LOG)
                                <'sftp-server.%p '>
                                ($ Id.VSub_DollarName '$SFTPSERVER')
                                <' '>
                                <Id.Right_DoubleQuote '"'>
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\$'>
                                )
                                <'@'>
                                <Id.Right_DoubleQuote '"'>
                                <'\n'>
                              ]
                            )
                        )
                      ]
                      do_fork: T
                    )
                    (C {<chmod>} {<a> <Id.Lit_Other '+'> <rx>} 
                      {($ Id.VSub_DollarName '$OBJ') <'/valgrind-sftp-server.sh'>}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:SFTPSERVER)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$OBJ') <'/valgrind-sftp-server.sh'>)}
                          spids: [1389]
                        )
                      ]
                    )
                  ]
                  spids: [1146 1164]
                )
              ]
            )
          ]
          spids: [1074 1093]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSH_LOGFILE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TEST_SSH_LOGFILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$OBJ') <'/ssh.log'>}
                  spids: [1434]
                )
              ]
            )
          ]
          spids: [1413 1431]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TEST_SSHD_LOGFILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$OBJ') <'/sshd.log'>}
                  spids: [1461]
                )
              ]
            )
          ]
          spids: [1440 1458]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$TEST_REGRESS_LOGFILE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TEST_REGRESS_LOGFILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$OBJ') <'/regress.log'>}
                  spids: [1488]
                )
              ]
            )
          ]
          spids: [1467 1485]
        )
      ]
    )
    (command.Simple
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')}
        )
      ]
      do_fork: F
    )
    (command.Simple
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE')}
        )
      ]
      do_fork: F
    )
    (command.Simple
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$TEST_REGRESS_LOGFILE')}
        )
      ]
      do_fork: F
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHLOGWRAP)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$OBJ') <'/ssh-log-wrapper.sh'>}
          spids: [1514]
        )
      ]
    )
    (command.Simple
      words: [{<echo>} {(DQ <'#!/bin/sh'>)}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$SSHLOGWRAP')}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [
        {<echo>}
        {(DQ <'exec '> (${ Id.VSub_Name SSH) <' -E'> (${ Id.VSub_Name TEST_SSH_LOGFILE) <' '>) 
          (SQ <'"$@"'>)
        }
      ]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$SSHLOGWRAP')}
        )
      ]
      do_fork: T
    )
    (C {<chmod>} {<a> <Id.Lit_Other '+'> <rx>} {($ Id.VSub_DollarName '$OBJ') <'/ssh-log-wrapper.sh'>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REAL_SSH)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$SSH'))}
          spids: [1558]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSH)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$SSHLOGWRAP'))}
          spids: [1563]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DATANAME)
          op: assign_op.Equal
          rhs: {<Id.KW_Data data>}
          spids: [1581]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DATA)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$OBJ') <'/'> (${ Id.VSub_Name DATANAME)}
          spids: [1584]
        )
      ]
    )
    (command.Simple
      words: [{<cat>} {(${ Id.VSub_Name SSHAGENT_BIN)}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{(${ Id.VSub_Name DATA)})]
      do_fork: T
    )
    (C {<chmod>} {<u> <Id.Lit_Other '+'> <w>} {(${ Id.VSub_Name DATA)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:COPY)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$OBJ') <'/copy'>}
          spids: [1612]
        )
      ]
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name COPY)})
    (command.ShFunction
      name: increase_datafile_size
      body: 
        (BraceGroup
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<du>} {<-k>} {(${ Id.VSub_Name DATA)})
                                    (C {<cut>} {<-f1>})
                                  ]
                                  negated: F
                                )
                            )
                          } {<-lt>} {($ Id.VSub_Number '$1')} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [{<cat>} {(${ Id.VSub_Name SSHAGENT_BIN)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name DATA)}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {<export>} {<SSH>} {<SSHD>} {<SSHAGENT>} {<SSHADD>} {<SSHKEYGEN>} {<SSHKEYSCAN>} {<SFTP>} 
      {<SFTPSERVER>} {<SCP>}
    )
    (command.ShFunction
      name: have_prog
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:saved_IFS)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$IFS'))}
                  spids: [1718]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {(DQ <':'>)}
                  spids: [1724]
                )
              ]
            )
            (command.ForEach
              iter_name: i
              iter_words: [{($ Id.VSub_DollarName '$PATH')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-x>} 
                                      {($ Id.VSub_DollarName '$i') <'/'> ($ Id.VSub_Number '$1')} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:IFS)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$saved_IFS'))}
                                  spids: [1758]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [1742 1755]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$saved_IFS'))}
                  spids: [1775]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: jot
      body: 
        (BraceGroup
          children: [
            (C {<awk>} 
              {
                (DQ <'BEGIN { for (i = '> ($ Id.VSub_Number '$2') <'; i < '> ($ Id.VSub_Number '$2') 
                  <' + '> ($ Id.VSub_Number '$1') <'; i++) { printf '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                  <'%d'> <Id.Lit_BadBackslash '\\'> <n> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                  <', i } exit }'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: config_defined
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:str)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [1827]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<test>} {(DQ <x> ($ Id.VSub_Number '$2'))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:str)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$str') <'|'> ($ Id.VSub_Number '$2'))}
                          spids: [1852]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                )
            )
            (command.Simple
              words: [
                {<egrep>}
                {(DQ <'^#define.*('> ($ Id.VSub_DollarName '$str') <')'>)}
                {(${ Id.VSub_Name BUILDDIR) <'/config.h'>}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: md5
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<have_prog>} {<md5sum>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<md5sum>})]
                  spids: [1896 1903]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<have_prog>} {<openssl>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<openssl>} {<md5>})]
                  spids: [1909 1916]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<have_prog>} {<cksum>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<cksum>})]
                  spids: [1924 1931]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<have_prog>} {<sum>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<sum>})]
                  spids: [1937 1944]
                )
              ]
              else_action: [(C {<wc>} {<-c>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: stop_sshd
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$PIDFILE')} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:pid)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (C {($ Id.VSub_DollarName '$SUDO')} {<cat>} 
                                    {($ Id.VSub_DollarName '$PIDFILE')}
                                  )
                              )
                            }
                          spids: [1988]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {(DQ <X> ($ Id.VSub_DollarName '$pid'))} 
                                      {<Id.Lit_Equals '='>} {(DQ <X>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<echo>} {<no>} {<sshd>} {<running>})]
                          spids: [2000 2018]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$pid')} 
                                          {<-lt>} {<2>} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo>} {<bad>} {<pid>} {<Id.KW_For for>} {<sshd> <Id.Lit_Colon ':'>} 
                                  {($ Id.VSub_DollarName '$pid')}
                                )
                              ]
                              spids: [2033 2046]
                            )
                          ]
                          else_action: [
                            (C {($ Id.VSub_DollarName '$SUDO')} {<kill>} {($ Id.VSub_DollarName '$pid')})
                            (C {<trace>} {(DQ <'wait for sshd to exit'>)})
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:i)
                                      op: assign_op.Equal
                                      rhs: {<0>}
                                      spids: [2080]
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.WhileUntil
                              keyword: <Id.KW_While while>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {($ Id.VSub_DollarName '$PIDFILE')} {<-a>} {($ Id.VSub_DollarName '$i')} {<-lt>} {<5>} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:i)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (command_sub
                                                left_token: <Id.Left_Backtick '`'>
                                                child: 
                                                  (C {<expr>} {($ Id.VSub_DollarName '$i')} 
                                                    {<Id.Lit_Other '+'>} {<1>}
                                                  )
                                              )
                                            }
                                          spids: [2107]
                                        )
                                      ]
                                    )
                                    (C {<sleep>} {($ Id.VSub_DollarName '$i')})
                                  ]
                                )
                            )
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<test>} {<-f>} {($ Id.VSub_DollarName '$PIDFILE')})
                                (C {<fatal>} 
                                  {
                                    (DQ <'sshd didn\'t exit port '> ($ Id.VSub_DollarName '$PORT') 
                                      <' pid '> ($ Id.VSub_DollarName '$pid')
                                    )
                                  }
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [1974 1985]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cleanup
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName '$SSH_PID'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$SSH_PID')} 
                                      {<-lt>} {<2>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {<bad>} {<pid>} {<Id.KW_For for>} {<ssh> <Id.Lit_Colon ':'>} 
                              {($ Id.VSub_DollarName '$SSH_PID')}
                            )
                          ]
                          spids: [2193 2206]
                        )
                      ]
                      else_action: [(C {<kill>} {($ Id.VSub_DollarName '$SSH_PID')})]
                    )
                  ]
                  spids: [2171 2190]
                )
              ]
            )
            (C {<stop_sshd>})
          ]
        )
    )
    (command.ShFunction
      name: start_debug_log
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ <'trace: '> ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_REGRESS_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'trace: '> ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'trace: '> ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE')}
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: save_debug_log
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {($ Id.VSub_At '$@')}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_REGRESS_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {($ Id.VSub_At '$@')}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {($ Id.VSub_At '$@')}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (command.Subshell
              child: 
                (command.CommandList
                  children: [
                    (command.Sentence
                      child: (C {<cat>} {($ Id.VSub_DollarName '$TEST_REGRESS_LOGFILE')})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<echo>})
                  ]
                )
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/failed-regress.log'>}
                )
              ]
            )
            (command.Subshell
              child: 
                (command.CommandList
                  children: [
                    (command.Sentence
                      child: (C {<cat>} {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<echo>})
                  ]
                )
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/failed-ssh.log'>}
                )
              ]
            )
            (command.Subshell
              child: 
                (command.CommandList
                  children: [
                    (command.Sentence
                      child: (C {<cat>} {($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE')})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<echo>})
                  ]
                )
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/failed-sshd.log'>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: trace
      body: 
        (BraceGroup
          children: [
            (C {<start_debug_log>} {($ Id.VSub_At '$@')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {(DQ <X> ($ Id.VSub_DollarName '$TEST_SSH_TRACE'))} {<Id.Lit_Equals '='>} {(DQ <Xyes>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [2374 2392]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: verbose
      body: 
        (BraceGroup
          children: [
            (C {<start_debug_log>} {($ Id.VSub_At '$@')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {(DQ <X> ($ Id.VSub_DollarName '$TEST_SSH_QUIET'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Xyes>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [2420 2439]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: warn
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ <'WARNING: '> ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')}
                )
              ]
              do_fork: T
            )
            (C {<echo>} {(DQ <'WARNING: '> ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: fail
      body: 
        (BraceGroup
          children: [
            (C {<save_debug_log>} {(DQ <'FAIL: '> ($ Id.VSub_At '$@'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RESULT)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [2499]
                )
              ]
            )
            (C {<echo>} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: fatal
      body: 
        (BraceGroup
          children: [
            (C {<save_debug_log>} {(DQ <'FATAL: '> ($ Id.VSub_At '$@'))})
            (C {<printf>} {(DQ <'FATAL: '>)})
            (C {<fail>} {(DQ ($ Id.VSub_At '$@'))})
            (C {<cleanup>})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$RESULT')}
            )
          ]
        )
    )
    (command.ShFunction
      name: ssh_version
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} {(${ Id.VSub_Name SSH_PROTOCOLS)})
                (command.Simple
                  words: [{<grep>} {(DQ ($ Id.VSub_Number '$1'))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RESULT)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [2581]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PIDFILE)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$OBJ') <'/pidfile'>}
          spids: [2584]
        )
      ]
    )
    (C {<trap>} {<fatal>} {<3>} {<2>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [(command.Sentence child:(C {<ssh_version>} {<1>}) terminator:<Id.Op_Semi _>)]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PROTO)
                  op: assign_op.Equal
                  rhs: {(DQ <'2,1'>)}
                  spids: [2608]
                )
              ]
            )
          ]
          spids: [2598 2605]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:PROTO)
              op: assign_op.Equal
              rhs: {(DQ <2>)}
              spids: [2616]
            )
          ]
        )
      ]
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 2658
              stdin_parts: [
                <'\tStrictModes\t\tno\n'>
                <'\tPort\t\t\t'>
                ($ Id.VSub_DollarName '$PORT')
                <'\n'>
                <'\tAddressFamily\t\tinet\n'>
                <'\tListenAddress\t\t127.0.0.1\n'>
                <'\t#ListenAddress\t\t::1\n'>
                <'\tPidFile\t\t\t'>
                ($ Id.VSub_DollarName '$PIDFILE')
                <'\n'>
                <'\tAuthorizedKeysFile\t'>
                ($ Id.VSub_DollarName '$OBJ')
                <'/authorized_keys_%u\n'>
                <'\tLogLevel\t\tDEBUG3\n'>
                <'\tAcceptEnv\t\t_XXX_TEST_*\n'>
                <'\tAcceptEnv\t\t_XXX_TEST\n'>
                <'\tSubsystem\tsftp\t'>
                ($ Id.VSub_DollarName '$SFTPSERVER')
                <'\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>}
        )
      ]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$TEST_SSH_UNSAFE_PERMISSIONS'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'StrictModes no'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>}
                )
              ]
              do_fork: T
            )
          ]
          spids: [2669 2684]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$TEST_SSH_SSHD_CONFOPTS'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<trace>} 
              {(DQ <'adding sshd_config option '> ($ Id.VSub_DollarName '$TEST_SSH_SSHD_CONFOPTS'))}
            )
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$TEST_SSH_SSHD_CONFOPTS'))}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>}
                )
              ]
              do_fork: T
            )
          ]
          spids: [2701 2716]
        )
      ]
    )
    (C {<cp>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>} 
      {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
    )
    (command.Simple
      words: [{<echo>} {(SQ <'StrictModes no'>)}]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 2805
              stdin_parts: [
                <'Host *\n'>
                <'\tHostname\t\t127.0.0.1\n'>
                <'\tHostKeyAlias\t\tlocalhost-with-alias\n'>
                <'\tPort\t\t\t'>
                ($ Id.VSub_DollarName '$PORT')
                <'\n'>
                <'\tUser\t\t\t'>
                ($ Id.VSub_DollarName '$USER')
                <'\n'>
                <'\tGlobalKnownHostsFile\t'>
                ($ Id.VSub_DollarName '$OBJ')
                <'/known_hosts\n'>
                <'\tUserKnownHostsFile\t'>
                ($ Id.VSub_DollarName '$OBJ')
                <'/known_hosts\n'>
                <'\tPubkeyAuthentication\tyes\n'>
                <'\tChallengeResponseAuthentication\tno\n'>
                <'\tHostbasedAuthentication\tno\n'>
                <'\tPasswordAuthentication\tno\n'>
                <'\tBatchMode\t\tyes\n'>
                <'\tStrictHostKeyChecking\tyes\n'>
                <'\tLogLevel\t\tDEBUG3\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$OBJ') <'/ssh_config'>}
        )
      ]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {(DQ ($ Id.VSub_DollarName '$TEST_SSH_SSH_CONFOPTS'))} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<trace>} 
              {(DQ <'adding ssh_config option '> ($ Id.VSub_DollarName '$TEST_SSH_SSH_CONFOPTS'))}
            )
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$TEST_SSH_SSH_CONFOPTS'))}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/ssh_config'>}
                )
              ]
              do_fork: T
            )
          ]
          spids: [2807 2822]
        )
      ]
    )
    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$OBJ') <'/known_hosts'>} 
      {($ Id.VSub_DollarName '$OBJ') <'/authorized_keys_'> ($ Id.VSub_DollarName '$USER')}
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [(command.Sentence child:(C {<ssh_version>} {<1>}) terminator:<Id.Op_Semi _>)]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SSH_KEYTYPES)
                  op: assign_op.Equal
                  rhs: {(DQ <'rsa rsa1'>)}
                  spids: [2869]
                )
              ]
            )
          ]
          spids: [2859 2866]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:SSH_KEYTYPES)
              op: assign_op.Equal
              rhs: {(DQ <'rsa ed25519'>)}
              spids: [2877]
            )
          ]
        )
      ]
    )
    (C {<trace>} {(DQ <'generate keys'>)})
    (command.ForEach
      iter_name: t
      iter_words: [{(${ Id.VSub_Name SSH_KEYTYPES)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                  {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name SSHKEYGEN_BIN)} {<-nt>} 
                                  {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(${ Id.VSub_Name SSHKEYGEN)} {<-q>} {<-N>} {(SQ )} {<-t>} 
                          {($ Id.VSub_DollarName '$t')} {<-f>} {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')}
                        )
                        (C {<fail>} {(DQ <'ssh-keygen for '> ($ Id.VSub_DollarName '$t') <' failed'>)})
                      ]
                    )
                  ]
                  spids: [2908 2939]
                )
              ]
            )
            (command.Subshell
              child: 
                (command.CommandList
                  children: [
                    (C {<printf>} {(SQ <'localhost-with-alias,127.0.0.1,::1 '>)})
                    (C {<cat>} {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t') <.pub>})
                  ]
                )
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/known_hosts'>}
                )
              ]
            )
            (command.Simple
              words: [{<cat>} {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t') <.pub>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: 
                    {($ Id.VSub_DollarName '$OBJ') <'/authorized_keys_'> 
                      ($ Id.VSub_DollarName '$USER')
                    }
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {<IdentityFile>}
                {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/ssh_config'>}
                )
              ]
              do_fork: T
            )
            (C {($ Id.VSub_DollarName '$SUDO')} {<cp>} 
              {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')} {($ Id.VSub_DollarName '$OBJ') <'/host.'> ($ Id.VSub_DollarName '$t')}
            )
            (command.Simple
              words: [
                {<echo>}
                {<HostKey>}
                {($ Id.VSub_DollarName '$OBJ') <'/host.'> ($ Id.VSub_DollarName '$t')}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {<HostKey>}
                {($ Id.VSub_DollarName '$OBJ') <'/'> ($ Id.VSub_DollarName '$t')}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (C {<chmod>} {<644>} 
      {($ Id.VSub_DollarName '$OBJ') <'/authorized_keys_'> ($ Id.VSub_DollarName '$USER')}
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_CONCH)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [3115]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<test>} {<-x>} {(DQ ($ Id.VSub_DollarName '$CONCH'))})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_CONCH)
                  op: assign_op.Equal
                  rhs: {<yes>}
                  spids: [3133]
                )
              ]
            )
          ]
          spids: [3118 3130]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_PUTTY)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [3145]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {<-x>} {(DQ ($ Id.VSub_DollarName '$PUTTYGEN'))} {<-a>} {<-x>} 
                      {(DQ ($ Id.VSub_DollarName '$PLINK'))}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_PUTTY)
                  op: assign_op.Equal
                  rhs: {<yes>}
                  spids: [3171]
                )
              ]
            )
          ]
          spids: [3148 3168]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_DollarName '$SCRIPT'))}
      arms: [
        (case_arm
          pat_list: [{<Id.Lit_Star '*'> <putty> <Id.Lit_Star '*'>}]
          spids: [3184 3187 3189 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_PUTTY)
                  op: assign_op.Equal
                  rhs: {<no>}
                  spids: [3194]
                )
              ]
            )
          ]
          spids: [3191 3192 3197 -1]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$REGRESS_INTEROP_PUTTY'))} 
                      {<Id.Lit_Equals '='>} {(DQ <yes>)}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<mkdir>} {<-p>} {(${ Id.VSub_Name OBJ) <'/.putty'>})
            (C {<rm>} {<-f>} {(${ Id.VSub_Name OBJ) <'/putty.rsa2'>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [
                                    {<puttygen>}
                                    {<-t>}
                                    {<rsa>}
                                    {<-o>}
                                    {(${ Id.VSub_Name OBJ) <'/putty.rsa2'>}
                                    {<--new-passphrase>}
                                    {<'/dev/null'>}
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Less '<'>
                                      loc: (redir_loc.Fd fd:0)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ 
                            <
'Your installed version of PuTTY is too old to support --new-passphrase; trying without (may require manual interaction) ...'
                            >
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.Simple
                      words: [{<puttygen>} {<-t>} {<rsa>} {<-o>} {(${ Id.VSub_Name OBJ) <'/putty.rsa2'>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [3246 3278]
                )
              ]
            )
            (command.Simple
              words: [{<puttygen>} {<-O>} {<public-openssh>} {(${ Id.VSub_Name OBJ) <'/putty.rsa2'>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: 
                    {($ Id.VSub_DollarName '$OBJ') <'/authorized_keys_'> 
                      ($ Id.VSub_DollarName '$USER')
                    }
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {(${ Id.VSub_Name SRC) <'/ssh2putty.sh'>}
                {<127.0.0.1>}
                {($ Id.VSub_DollarName '$PORT')}
                {($ Id.VSub_DollarName '$OBJ') <'/rsa'>}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sshhostkeys'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {(${ Id.VSub_Name SRC) <'/ssh2putty.sh'>}
                {<127.0.0.1>}
                {<22>}
                {($ Id.VSub_DollarName '$OBJ') <'/rsa'>}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sshhostkeys'>}
                )
              ]
              do_fork: T
            )
            (C {<mkdir>} {<-p>} {(${ Id.VSub_Name OBJ) <'/.putty/sessions'>})
            (C {<rm>} {<-f>} {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>})
            (command.Simple
              words: [{<echo>} {(DQ <'Protocol=ssh'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'HostName=127.0.0.1'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'PortNumber='> ($ Id.VSub_DollarName '$PORT'))}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'ProxyMethod=5'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'ProxyTelnetCommand=sh '> (${ Id.VSub_Name SRC) <'/sshd-log-wrapper.sh '> 
                    (${ Id.VSub_Name TEST_SSHD_LOGFILE) <' '> (${ Id.VSub_Name SSHD) <' -i -f '> ($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>
                  )
                }
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'ProxyLocalhost=1'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name OBJ) <'/.putty/sessions/localhost_proxy'>}
                )
              ]
              do_fork: T
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REGRESS_INTEROP_PUTTY)
                  op: assign_op.Equal
                  rhs: {<yes>}
                  spids: [3510]
                )
              ]
            )
          ]
          spids: [3202 3218]
        )
      ]
    )
    (command.Subshell
      child: 
        (command.CommandList
          children: [
            (C {<cat>} {($ Id.VSub_DollarName '$OBJ') <'/ssh_config'>})
            (C {<echo>} {<proxycommand>} {(${ Id.VSub_Name SUDO)} {<sh>} 
              {(${ Id.VSub_Name SRC) <'/sshd-log-wrapper.sh'>} {(${ Id.VSub_Name TEST_SSHD_LOGFILE)} {(${ Id.VSub_Name SSHD)} {<-i>} {<-f>} 
              {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>}
            )
          ]
        )
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$OBJ') <'/ssh_proxy'>}
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(${ Id.VSub_Name SSHD)} {<-t>} {<-f>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>})
        (C {<fatal>} {(DQ <'sshd_proxy broken'>)})
      ]
    )
    (command.ShFunction
      name: start_sshd
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {($ Id.VSub_DollarName '$SUDO')} {(${ Id.VSub_Name SSHD)} {<-f>} 
                  {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>} {(DQ ($ Id.VSub_At '$@'))} {<-t>}
                )
                (C {<fatal>} {(DQ <'sshd_config broken'>)})
              ]
            )
            (C {($ Id.VSub_DollarName '$SUDO')} {(${ Id.VSub_Name SSHD)} {<-f>} 
              {($ Id.VSub_DollarName '$OBJ') <'/sshd_config'>} {(DQ ($ Id.VSub_At '$@'))} {<-E> ($ Id.VSub_DollarName '$TEST_SSHD_LOGFILE')}
            )
            (C {<trace>} {(DQ <'wait for sshd'>)})
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:i)
                      op: assign_op.Equal
                      rhs: {<0>}
                      spids: [3654]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                          {($ Id.VSub_DollarName '$PIDFILE')} {<-a>} {($ Id.VSub_DollarName '$i')} {<-lt>} {<10>} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:i)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (C {<expr>} {($ Id.VSub_DollarName '$i')} {<Id.Lit_Other '+'>} {<1>})
                              )
                            }
                          spids: [3683]
                        )
                      ]
                    )
                    (C {<sleep>} {($ Id.VSub_DollarName '$i')})
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-f>} {($ Id.VSub_DollarName '$PIDFILE')})
                (C {<fatal>} {(DQ <'no sshd running on port '> ($ Id.VSub_DollarName '$PORT'))})
              ]
            )
          ]
        )
    )
    (C {<.>} {($ Id.VSub_DollarName '$SCRIPT')})
    (C {<cleanup>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$RESULT')} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<verbose>} {<ok>} {($ Id.VSub_DollarName '$tid')})]
          spids: [3737 3750]
        )
      ]
      else_action: [(C {<echo>} {<failed>} {($ Id.VSub_DollarName '$tid')})]
    )
    (command.ControlFlow
      token: <Id.ControlFlow_Exit exit>
      arg_word: {($ Id.VSub_DollarName '$RESULT')}
    )
  ]
)