(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:dirmode) op:Equal rhs:{(DQ )} spids:[91])]
      spids: [91]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:linkmode) op:Equal rhs:{(DQ )} spids:[95])]
      spids: [95]
    )
    (While
      cond: [
        (Sentence
          child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')})
          terminator: <Op_Semi ';'>
        )
      ]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {($ VSub_Number '$1')}
              arms: [
                (case_arm
                  pat_list: [{(-d)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:dirmode)
                              op: Equal
                              rhs: {(DQ (YES))}
                              spids: [125]
                            )
                          ]
                          spids: [125]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (C {(shift)})
                  ]
                  spids: [122 123 132 -1]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (bCcpSsv) (Lit_Other ']')}]
                  action: [(C {(shift)})]
                  spids: [135 139 142 -1]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (BDfghMmNoTU) (Lit_Other ']')}]
                  action: [(Sentence child:(C {(shift)}) terminator:<Op_Semi ';'>) (C {(shift)})]
                  spids: [145 149 155 -1]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (BDfghMmNoTU) (Lit_Other ']') (Lit_Other '*')}]
                  action: [(C {(shift)})]
                  spids: [158 163 166 -1]
                )
                (case_arm
                  pat_list: [{(-l)}]
                  action: [
                    (C {(shift)})
                    (Case
                      to_match: {($ VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(Lit_Other '*') (Lit_Other '[') (sm) (Lit_Other ']') (Lit_Other '*')}
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:linkmode)
                                  op: Equal
                                  rhs: {(DQ (symbolic))}
                                  spids: [190]
                                )
                              ]
                              spids: [190]
                            )
                          ]
                          spids: [183 188 194 -1]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*') (h) (Lit_Other '*')}]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:linkmode)
                                  op: Equal
                                  rhs: {(DQ (hard))}
                                  spids: [205]
                                )
                              ]
                              spids: [205]
                            )
                          ]
                          spids: [200 203 209 -1]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [
                            (Sentence
                              child: (C {(echo)} {(DQ ('invalid link mode'))})
                              terminator: <Op_Semi ';'>
                            )
                            (C {(exit)} {(1)})
                          ]
                          spids: [212 213 225 -1]
                        )
                      ]
                      spids: [176 180 228]
                    )
                    (C {(shift)})
                  ]
                  spids: [169 170 234 -1]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Break break>)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [237 238 -1 244]
                )
              ]
              spids: [115 119 244]
            )
          ]
          spids: [112 246]
        )
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {(DQ ($ VSub_Pound '$#'))} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Number '$0') (': no files/dirs specified'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[274])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [-1 264]
        )
      ]
      spids: [-1 282]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$dirmode'))} {(Lit_Other ']')})
                    (C {(Lit_Other '[')} {(DQ ($ VSub_Pound '$#'))} {(-lt)} {(2)} {(Lit_Other ']')})
                  ]
                  op_id: Op_DAmp
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Number '$0') (': no target specified'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[322])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [-1 312]
        )
      ]
      spids: [-1 330]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {(-n)} {(DQ (${ VSub_Name linkmode))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ (${ VSub_Name linkmode))} {(Lit_Other '=')} 
                          {(DQ (symbolic))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(ln)} {(-fsn)} {(DQ ($ VSub_At '$@'))})]
                  spids: [-1 373]
                )
              ]
              else_action: [(C {(ln)} {(-f)} {(DQ ($ VSub_At '$@'))})]
              spids: [385 397]
            )
          ]
          spids: [-1 351]
        )
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$dirmode'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(exec)} {(install)} {(-p)} {(DQ ($ VSub_At '$@'))})]
          spids: [399 412]
        )
      ]
      else_action: [(C {(exec)} {(install)} {(-d)} {(DQ ($ VSub_At '$@'))})]
      spids: [425 438]
    )
  ]
)