(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PERMS)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [14]
        )
      ]
    )
    (C {<shift>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ARGS)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [20]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>})
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ARGS)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$ARGS') <' '> ($ Id.VSub_Number '$1'))}
                  spids: [40]
                )
              ]
            )
            (C {<shift>})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DEST)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [52]
        )
      ]
    )
    (command.ForEach
      iter_name: SRC
      iter_words: [{($ Id.VSub_DollarName '$ARGS')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {<cp>} {<-a>} {($ Id.VSub_DollarName '$SRC')} {($ Id.VSub_DollarName '$DEST')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ ($ Id.VSub_DollarName '$DEST'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DESTFILE)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$DEST') <'/'> 
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$SRC'))})
                                )
                              )
                            }
                          spids: [94]
                        )
                      ]
                    )
                  ]
                  spids: [78 91]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:DESTFILE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName '$DEST'))}
                      spids: [111]
                    )
                  ]
                )
              ]
            )
            (command.Simple
              words: [{<chmod>} {($ Id.VSub_DollarName '$PERMS')} {($ Id.VSub_DollarName '$DESTFILE')}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)