(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:dirmode)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [91]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:linkmode)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [95]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>})
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_Number '$1')}
              arms: [
                (case_arm
                  pat_list: [{<-d>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:dirmode)
                              op: assign_op.Equal
                              rhs: {(DQ <YES>)}
                              spids: [125]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<shift>})
                  ]
                  spids: [122 123 132 -1]
                )
                (case_arm
                  pat_list: [{<-> <Id.Lit_LBracket '['> <bCcpSsv> <Id.Lit_RBracket ']'>}]
                  action: [(C {<shift>})]
                  spids: [135 139 142 -1]
                )
                (case_arm
                  pat_list: [{<-> <Id.Lit_LBracket '['> <BDfghMmNoTU> <Id.Lit_RBracket ']'>}]
                  action: [
                    (command.Sentence
                      child: (C {<shift>})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<shift>})
                  ]
                  spids: [145 149 155 -1]
                )
                (case_arm
                  pat_list: [
                    {<-> <Id.Lit_LBracket '['> <BDfghMmNoTU> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>}
                  ]
                  action: [(C {<shift>})]
                  spids: [158 163 166 -1]
                )
                (case_arm
                  pat_list: [{<-l>}]
                  action: [
                    (C {<shift>})
                    (command.Case
                      to_match: {($ Id.VSub_Number '$1')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> <Id.Lit_LBracket '['> <sm> <Id.Lit_RBracket ']'> 
                              <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:linkmode)
                                  op: assign_op.Equal
                                  rhs: {(DQ <symbolic>)}
                                  spids: [190]
                                )
                              ]
                            )
                          ]
                          spids: [183 188 194 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'> <h> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:linkmode)
                                  op: assign_op.Equal
                                  rhs: {(DQ <hard>)}
                                  spids: [205]
                                )
                              ]
                            )
                          ]
                          spids: [200 203 209 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.Sentence
                              child: (C {<echo>} {(DQ <'invalid link mode'>)})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [212 213 225 -1]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                  spids: [169 170 234 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Break break>)
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [237 238 -1 244]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Pound '$#'))} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_Number '$0') <': no files/dirs specified'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [249 264]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$dirmode'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Pound '$#'))} {<-lt>} {<2>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_Number '$0') <': no target specified'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [285 312]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name linkmode))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name linkmode))} 
                              {<Id.Lit_Equals '='>} {(DQ <symbolic>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<ln>} {<-fsn>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [354 373]
                )
              ]
              else_action: [(C {<ln>} {<-f>} {(DQ ($ Id.VSub_At '$@'))})]
            )
          ]
          spids: [336 351]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$dirmode'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<exec>} {<install>} {<-p>} {(DQ ($ Id.VSub_At '$@'))})]
          spids: [399 412]
        )
      ]
      else_action: [(C {<exec>} {<install>} {<-d>} {(DQ ($ Id.VSub_At '$@'))})]
    )
  ]
)