(CommandList
  children: [
    (C {(Lit_Other ":")})
    (FuncDef
      name: err_exit
      body: 
        (BraceGroup
          children: [
            (C {(print)} {(-u2)} {(DQ ($ VSub_Name "$command") (": ") ($ VSub_At "$@"))})
            (C {(exit)} {(1)})
          ]
          spids: [79]
        )
      spids: [75 78]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (C {(print)} {(-u2)} {(DQ ("Usage: ") ($ VSub_Name "$command") (" file ..."))})
            (C {(exit)} {(2)})
          ]
          spids: [104]
        )
      spids: [100 103]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:command)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Number 0>
                suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)})
                spids: [126 131]
              )
            }
          spids: [125]
        )
      ]
      spids: [125]
    )
    (Case
      to_match: {($ VSub_Number "$1")}
      arms: [
        (case_arm
          pat_list: [{(--)}]
          action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)]
          spids: [139 140 148 -1]
        )
        (case_arm
          pat_list: [{(DQ )} {(-) (EscapedLiteralPart token:<Lit_EscapedChar "\\?">)}]
          action: [(C {(usage)})]
          spids: [-1 155 160 -1]
        )
        (case_arm
          pat_list: [{(-) (Lit_Other "*")}]
          action: [
            (C {(print)} {(-u2)} {(--)} {(DQ ($ VSub_Number "$1") (": invalid option"))})
            (C {(usage)})
          ]
          spids: [162 164 181 -1]
        )
      ]
      spids: [133 137 183]
    )
    (AndOr
      children: [
        (SimpleCommand
          words: [{(2d)} {(Lit_Other "+")}]
          redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[194])]
        )
        (BraceGroup
          children: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (BraceGroup
                      children: [
                        (Sentence
                          child: 
                            (AndOr
                              children: [
                                (SimpleCommand
                                  words: [{(Lit_Other ":")}]
                                  redirects: [
                                    (Redir
                                      op_id: Redir_Great
                                      fd: -1
                                      arg_word: {(xxx)}
                                      spids: [205]
                                    )
                                  ]
                                )
                                (AndOr
                                  children: [(C {(rm)} {(xxx)}) (C {(2d)} {(Lit_Other "+")})]
                                  op_id: Op_DAmp
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          terminator: <Op_Semi ";">
                        )
                      ]
                      spids: [201]
                    )
                    (C {(exit)} {(1)})
                  ]
                  op_id: Op_DPipe
                )
              terminator: <Op_Semi ";">
            )
          ]
          spids: [199]
        )
      ]
      op_id: Op_DPipe
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:n)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(umask)})])
                left_token: <Left_CommandSub "$(">
                spids: [234 236]
              )
            }
          spids: [233]
        )
      ]
      spids: [233]
    )
    (ForEach
      iter_name: i
      do_arg_iter: True
      body: 
        (DoGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [(DBracket expr:(BoolUnary op_id:BoolUnary_f child:{($ VSub_Name "$i")}))]
                  action: [
                    (AndOr
                      children: [
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_ef
                              left: {($ VSub_Name "$i")}
                              right: {(.../...)}
                            )
                        )
                        (C {(print)} {(-u2)} 
                          {(DQ ($ VSub_Name "$command") (": ") ($ VSub_Name "$i") (": file exists"))}
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 256]
                )
              ]
              else_action: [
                (Case
                  to_match: {($ VSub_Name "$i")}
                  arms: [
                    (case_arm
                      pat_list: [{(Lit_Other "*") (/) (Lit_Other "*")}]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:dir)
                              op: Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name i>
                                    suffix_op: 
                                      (StringUnary
                                        op_id: VOp1_Percent
                                        arg_word: {(Lit_Slash /) ("*")}
                                      )
                                    spids: [297 302]
                                  )
                                }
                              spids: [296]
                            )
                            (assign_pair
                              lhs: (LhsName name:file)
                              op: Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name i>
                                    suffix_op: 
                                      (StringUnary
                                        op_id: VOp1_DPound
                                        arg_word: {("*") (Lit_Slash /)}
                                      )
                                    spids: [305 310]
                                  )
                                }
                              spids: [304]
                            )
                          ]
                          spids: [296]
                        )
                      ]
                      spids: [291 294 312 -1]
                    )
                    (case_arm
                      pat_list: [{(Lit_Other "*")}]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:dir)
                              op: Equal
                              rhs: {(.)}
                              spids: [318]
                            )
                            (assign_pair
                              lhs: (LhsName name:file)
                              op: Equal
                              rhs: {($ VSub_Name "$i")}
                              spids: [321]
                            )
                          ]
                          spids: [318]
                        )
                      ]
                      spids: [315 316 324 -1]
                    )
                  ]
                  spids: [284 288 327]
                )
                (AndOr
                  children: [
                    (DBracket
                      expr: (BoolBinary op_id:BoolBinary_ef left:{($ VSub_Name "$dir")} right:{(.)})
                    )
                    (AndOr
                      children: [
                        (C {(cd)} {(DQ ($ VSub_Name "$dir"))})
                        (C {(err_exit)} {(DQ ($ VSub_Name "$dir") (": cd failed"))})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  op_id: Op_DPipe
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (DBracket
                          expr: (LogicalNot child:(BoolUnary op_id:BoolUnary_f child:{(.../...)}))
                        )
                      ]
                      action: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (DBracket
                                  expr: (LogicalNot child:(BoolUnary op_id:BoolUnary_d child:{(...)}))
                                )
                              ]
                              action: [
                                (If
                                  arms: [
                                    (if_arm
                                      cond: [(C {(mkdir)} {(...)})]
                                      action: [
                                        (AndOr
                                          children: [
                                            (SimpleCommand
                                              words: [{(chgrp)} {(3d)} {(...)}]
                                              redirects: [
                                                (Redir
                                                  op_id: Redir_Great
                                                  fd: 2
                                                  arg_word: {(/dev/null)}
                                                  spids: [403]
                                                )
                                              ]
                                            )
                                            (C {(chmod)} {(g) (Lit_Other "+") (s)} {(...)})
                                          ]
                                          op_id: Op_DAmp
                                        )
                                        (C {(umask)} {(777)})
                                        (AndOr
                                          children: [
                                            (SimpleCommand
                                              redirects: [
                                                (Redir
                                                  op_id: Redir_Great
                                                  fd: -1
                                                  arg_word: {(.../...)}
                                                  spids: [422]
                                                )
                                              ]
                                            )
                                            (C {(err_exit)} 
                                              {(DQ ($ VSub_Name "$i") (": cannot opaque"))}
                                            )
                                          ]
                                          op_id: Op_DPipe
                                        )
                                        (C {(umask)} 
                                          {
                                            (BracedVarSub
                                              token: <VSub_Name n>
                                              suffix_op: 
                                                (StringUnary
                                                  op_id: VOp1_Pound
                                                  arg_word: {(8) (Lit_Pound "#")}
                                                )
                                              spids: [438 443]
                                            )
                                          }
                                        )
                                      ]
                                      spids: [-1 395]
                                    )
                                    (if_arm
                                      cond: [
                                        (DBracket
                                          expr: 
                                            (LogicalNot
                                              child: (BoolUnary op_id:BoolUnary_f child:{(...)})
                                            )
                                        )
                                      ]
                                      action: [(C {(err_exit)} {(DQ ("...: cannot mkdir"))})]
                                      spids: [446 459]
                                    )
                                    (if_arm
                                      cond: [
                                        (DBracket
                                          expr: 
                                            (LogicalOr
                                              left: (BoolUnary op_id:BoolUnary_r child:{(...)})
                                              right: 
                                                (LogicalOr
                                                  left: (BoolUnary op_id:BoolUnary_w child:{(...)})
                                                  right: 
                                                    (LogicalOr
                                                      left: (BoolUnary op_id:BoolUnary_x child:{(...)})
                                                      right: 
                                                        (BoolUnary
                                                          op_id: BoolUnary_s
                                                          child: {(...)}
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                      ]
                                      action: [
                                        (C {(err_exit)} 
                                          {(DQ ("...: obsolescent opaque must be 0 mode file"))}
                                        )
                                      ]
                                      spids: [468 498]
                                    )
                                  ]
                                  else_action: [
                                    (AndOr
                                      children: [
                                        (C {(mkdir)} {(...3d)})
                                        (C {(err_exit)} {(DQ ("...3d: cannot mkdir"))})
                                      ]
                                      op_id: Op_DPipe
                                    )
                                    (If
                                      arms: [
                                        (if_arm
                                          cond: [(C {(mv)} {(...)} {(...3d)})]
                                          action: [
                                            (If
                                              arms: [
                                                (if_arm
                                                  cond: [(C {(mv)} {(...3d)} {(...)})]
                                                  action: [(C {(Lit_Other ":")})]
                                                  spids: [-1 542]
                                                )
                                              ]
                                              else_action: [
                                                (C {(rmdir)} {(...)})
                                                (C {(mv)} {(...3d)} {(...)})
                                                (C {(err_exit)} 
                                                  {(DQ ("...: cannot rename obsolescent opaque"))}
                                                )
                                              ]
                                              spids: [547 568]
                                            )
                                          ]
                                          spids: [-1 531]
                                        )
                                      ]
                                      else_action: [
                                        (C {(rmdir)} {(...3d)})
                                        (C {(err_exit)} {(DQ ("...: cannot rename obsolescent opaque"))})
                                      ]
                                      spids: [571 585]
                                    )
                                    (AndOr
                                      children: [
                                        (SimpleCommand
                                          words: [{(chgrp)} {(3d)} {(...)}]
                                          redirects: [
                                            (Redir
                                              op_id: Redir_Great
                                              fd: 2
                                              arg_word: {(/dev/null)}
                                              spids: [594]
                                            )
                                          ]
                                        )
                                        (C {(chmod)} {(g) (Lit_Other "+") (s)} {(...)})
                                      ]
                                      op_id: Op_DAmp
                                    )
                                  ]
                                  spids: [507 608]
                                )
                              ]
                              spids: [-1 386]
                            )
                          ]
                          else_action: [
                            (C {(umask)} {(777)})
                            (AndOr
                              children: [
                                (SimpleCommand
                                  redirects: [
                                    (Redir
                                      op_id: Redir_Great
                                      fd: -1
                                      arg_word: {(.../...)}
                                      spids: [618]
                                    )
                                  ]
                                )
                                (C {(err_exit)} {(DQ ($ VSub_Name "$i") (": cannot opaque"))})
                              ]
                              op_id: Op_DPipe
                            )
                            (C {(umask)} 
                              {
                                (BracedVarSub
                                  token: <VSub_Name n>
                                  suffix_op: 
                                    (StringUnary
                                      op_id: VOp1_Pound
                                      arg_word: {(8) (Lit_Pound "#")}
                                    )
                                  spids: [634 639]
                                )
                              }
                            )
                          ]
                          spids: [611 642]
                        )
                      ]
                      spids: [-1 371]
                    )
                  ]
                  spids: [-1 645]
                )
                (C {(ln)} {(.../...)} {(DQ ($ VSub_Name "$file"))})
                (AndOr
                  children: [
                    (DBracket
                      expr: (BoolBinary op_id:BoolBinary_ef left:{($ VSub_Name "$dir")} right:{(.)})
                    )
                    (AndOr
                      children: [
                        (C {(cd)} {(TildeSubPart prefix:-)})
                        (C {(err_exit)} {(DQ ($ VSub_Name "$OLDPWD") (": cannot restore directory"))})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  op_id: Op_DPipe
                )
              ]
              spids: [282 684]
            )
          ]
          spids: [243 686]
        )
      spids: [-1 -1]
    )
  ]
)