(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tid)
          op: assign_op.Equal
          rhs: {(DQ <'basic sftp put/get'>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SFTPCMDFILE)
          op: assign_op.Equal
          rhs: {(${ Id.VSub_Name OBJ) <'/batch'>}
          spids: [13]
        )
      ]
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$SFTPCMDFILE')}
        )
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 43
              stdin_parts: [
                <'version\n'>
                <'get '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                (${ Id.VSub_Name COPY)
                <'.1\n'>
                <'put '>
                ($ Id.VSub_DollarName '$DATA')
                <' '>
                (${ Id.VSub_Name COPY)
                <'.2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BUFFERSIZE)
          op: assign_op.Equal
          rhs: {(DQ <'5 1000 32000 64000'>)}
          spids: [45]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REQUESTS)
          op: assign_op.Equal
          rhs: {(DQ <'1 2 10'>)}
          spids: [50]
        )
      ]
    )
    (command.ForEach
      iter_name: B
      iter_words: [{(${ Id.VSub_Name BUFFERSIZE)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ForEach
              iter_name: R
              iter_words: [{(${ Id.VSub_Name REQUESTS)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<verbose>} 
                      {
                        (DQ <'test '> ($ Id.VSub_DollarName '$tid') <': buffer_size '> 
                          ($ Id.VSub_DollarName '$B') <' num_requests '> ($ Id.VSub_DollarName '$R')
                        )
                      }
                    )
                    (C {<rm>} {<-f>} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>})
                    (command.Simple
                      words: [
                        {(${ Id.VSub_Name SFTP)}
                        {<-D>}
                        {(${ Id.VSub_Name SFTPSERVER)}
                        {<-B>}
                        {($ Id.VSub_DollarName '$B')}
                        {<-R>}
                        {($ Id.VSub_DollarName '$R')}
                        {<-b>}
                        {($ Id.VSub_DollarName '$SFTPCMDFILE')}
                      ]
                      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.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:r)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '$?')}
                          spids: [143]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$r')} {<-ne>} 
                                      {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<fail>} {(DQ <'sftp failed with '> ($ Id.VSub_DollarName '$r'))})]
                          spids: [147 160]
                        )
                      ]
                      else_action: [
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<cmp>} {($ Id.VSub_DollarName '$DATA')} {(${ Id.VSub_Name COPY) <.1>})
                            (C {<fail>} {(DQ <'corrupted copy after get'>)})
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<cmp>} {($ Id.VSub_DollarName '$DATA')} {(${ Id.VSub_Name COPY) <.2>})
                            (C {<fail>} {(DQ <'corrupted copy after put'>)})
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name COPY) <.1>} {(${ Id.VSub_Name COPY) <.2>})
    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$SFTPCMDFILE')})
  ]
)