(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 16777215]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (bCcpSsv) (Lit_Other ']')}]
                  action: [(C {(shift)})]
                  spids: [135 139 142 16777215]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (BDfghMmNoTU) (Lit_Other ']')}]
                  action: [(Sentence child:(C {(shift)}) terminator:<Op_Semi ';'>) (C {(shift)})]
                  spids: [145 149 155 16777215]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other '[') (BDfghMmNoTU) (Lit_Other ']') (Lit_Other '*')}]
                  action: [(C {(shift)})]
                  spids: [158 163 166 16777215]
                )
                (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 16777215]
                        )
                        (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 16777215]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [
                            (Sentence
                              child: (C {(echo)} {(DQ ('invalid link mode'))})
                              terminator: <Op_Semi ';'>
                            )
                            (ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(1)}
                            )
                          ]
                          spids: [212 213 225 16777215]
                        )
                      ]
                      spids: [176 180 228]
                    )
                    (C {(shift)})
                  ]
                  spids: [169 170 234 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Break break>)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [237 238 16777215 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:16777215 arg_word:{(2)} spids:[274])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 264]
        )
      ]
      spids: [16777215 282]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  ops: [Op_DAmp]
                  children: [
                    (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$dirmode'))} {(Lit_Other ']')})
                    (C {(Lit_Other '[')} {(DQ ($ VSub_Pound '$#'))} {(-lt)} {(2)} {(Lit_Other ']')})
                  ]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Number '$0') (': no target specified'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[322])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 312]
        )
      ]
      spids: [16777215 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: [16777215 373]
                )
              ]
              else_action: [(C {(ln)} {(-f)} {(DQ ($ VSub_At '$@'))})]
              spids: [385 397]
            )
          ]
          spids: [16777215 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]
    )
  ]
)