(command.CommandList
  children: [
    (C {<Id.Lit_Colon ':'>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:COMPILEDIR)
          op: assign_op.Equal
          rhs: 
            {<'/sys/'> (command_sub left_token:<Id.Left_Backtick '`'> child:(C {<uname>} {<-m>})) 
              <'/compile'>
            }
          spids: [45]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:KERNELNAME)
          op: assign_op.Equal
          rhs: {<LINT>}
          spids: [56]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SORTORDER)
          op: assign_op.Equal
          rhs: {<-k1>}
          spids: [59]
        )
      ]
    )
    (command.Sentence
      child: 
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:args)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    child: 
                      (C {<getopt>} 
                        {<h> <Id.Lit_QMark '?'> <k> <Id.Lit_Colon ':'> <s> <Id.Lit_Colon ':'>} {($ Id.VSub_Star '$*')}
                      )
                  )
                }
              spids: [63]
            )
          ]
        )
      terminator: <Id.Op_Semi _>
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:args)
                      op: assign_op.Equal
                      rhs: {(DQ <-h>)}
                      spids: [96]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          spids: [80 93]
        )
      ]
    )
    (command.Sentence
      child: (C {<set>} {<-->} {($ Id.VSub_DollarName '$args')})
      terminator: <Id.Op_Semi _>
    )
    (command.ForEach
      iter_name: i
      do_arg_iter: T
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$i'))}
              arms: [
                (case_arm
                  pat_list: [{<-h>} {<-> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)}]
                  action: [
                    (command.Sentence
                      child: 
                        (C {<echo>} 
                          {
                            (DQ <'Usage: '> ($ Id.VSub_Number '$0') 
                              <' [ -k <kernelname> ] [ -s [ \'symbol\' | \'filename\' ] ]'>
                            )
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [128 132 151 -1]
                )
                (case_arm
                  pat_list: [{<-k>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:KERNELNAME)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$2')}
                          spids: [158]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-d>} 
                                      {(${ Id.VSub_Name COMPILEDIR) <'/'> (${ Id.VSub_Name KERNELNAME)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          spids: [162 180]
                        )
                      ]
                    )
                    (command.Sentence
                      child: 
                        (C {<echo>} 
                          {
                            (DQ <'Kernel \''> ($ Id.VSub_DollarName '$KERNELNAME') 
                              <'\' does not exist in '> (${ Id.VSub_Name COMPILEDIR) <'!'>
                            )
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [154 155 217 -1]
                )
                (case_arm
                  pat_list: [{<-s>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_Number '$2'))} 
                                  {<Id.Lit_Equals '='>} {(DQ <xsymbol>)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SORTORDER)
                                  op: assign_op.Equal
                                  rhs: {<-k1>}
                                  spids: [245]
                                )
                              ]
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          spids: [224 242]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_Number '$2'))} 
                                  {<Id.Lit_Equals '='>} {(DQ <xfilename>)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:SORTORDER)
                                  op: assign_op.Equal
                                  rhs: {<-k2>}
                                  spids: [284]
                                )
                              ]
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (C {<shift>})
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          spids: [263 281]
                        )
                      ]
                    )
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Invalid selection for -s: '> ($ Id.VSub_Number '$2'))})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [220 221 317 -1]
                )
                (case_arm
                  pat_list: [{<-->}]
                  action: [
                    (command.Sentence
                      child: (C {<shift>})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Break break>)
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [320 321 332 -1]
                )
              ]
            )
          ]
        )
    )
    (C {<cd>} {(${ Id.VSub_Name COMPILEDIR) <'/'> (${ Id.VSub_Name KERNELNAME)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:MOD_OBJS)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (C {<find>} {<modules>} {<-name>} 
                    {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\*'>) <.o>}
                  )
              )
            }
          spids: [351]
        )
      ]
    )
    (command.Pipeline
      children: [
        (command.ForEach
          iter_name: i
          iter_words: [{<Id.Lit_Star '*'> <.o>} {($ Id.VSub_DollarName '$MOD_OBJS')}]
          do_arg_iter: F
          body: (command.DoGroup children:[(C {<nm>} {<-gon>} {($ Id.VSub_DollarName '$i')})])
        )
        (C {<sed>} {(SQ <'\n'> <'/aicasm.*:/d\n'> <'/genassym.*:/d\n'> <'s/.*\\///\n'> <'s/:/ /\n'>)})
        (C {<awk>} 
          {
            (SQ <'\n'> <'NF > 1\t{\n'> <'\tif ($2 == "t") \n'> <'\t\tnext\n'> <'\tif ($2 == "F")\n'> 
              <'\t\tnext\n'> <'\tif ($2 == "U") {\n'> <'\t\tref[$3]=ref[$3]" "$1\n'> <'\t\tnm[$3]++\n'> 
              <'\t} else if ($3 == "D" || $3 == "T" || $3 == "B" || $3 == "R" || $3 == "A") {\n'> <'\t\tif (def[$4] != "")\n'> <'\t\t\tdef[$4]=def[$4]" "$1\n'> <'\t\telse\n'> <'\t\t\tdef[$4]=$1\n'> 
              <'\t\tnm[$4]++\n'> <'\t} else if ($2 == "?") {\n'> <'\t\tif (def[$3] == "S")\n'> <'\t\t\ti++\n'> 
              <'\t\telse if (def[$3] != "")\n'> <'\t\t\tdef[$3]=def[$3]",S"\n'> <'\t\telse\n'> <'\t\t\tdef[$3]="S"\n'> <'\t\tref[$3]=ref[$3]" "$1\n'> 
              <'\t\tnm[$3]++\n'> <'\t} else if ($2 == "C") {\n'> <'\t\tif (def[$3] == $2)\n'> <'\t\t\ti++\n'> 
              <'\t\telse if (def[$3] == "")\n'> <'\t\t\tdef[$3]=$1\n'> <'\t\telse\n'> <'\t\t\tref[$3]=ref[$3]" "$1\n'> <'\t\tnm[$3]++\n'> 
              <'\t} else {\n'> <'\t\tprint ">>>",$0\n'> <'\t}\n'> <'\t}\n'> <'END\t{\n'> <'\tfor (i in nm) {\n'> 
              <'\t\tprintf "%s {%s} %s\\n",i,def[i],ref[i]\n'> <'\t}\n'> <'\t}\n'>
            )
          }
        )
        (C {<sort>} {($ Id.VSub_DollarName '$SORTORDER')})
        (C {<awk>} 
          {
            (SQ <'\n'> <'\t{\n'> <'\tif ($2 == "{S}")\n'> <'\t\t$2 = "<Linker set>"\n'> 
              <'\tif (length($3) == 0) {\n'> <'\t\tprintf "%-31s %d %s\\tUNREF\\n",$1,0, $2\n'> <'\t\tN1++\n'> <'\t} else if ($2 == "{}") {\n'> 
              <'\t\tprintf "%-31s %d {UNDEF}\\n",$1, NF-2\n'> <'\t\tN2++\n'> <'\t} else {\n'> <'\t\tprintf "%-31s %d %s",$1,NF-2,$2\n'> <'\t\tp = 80;\n'> 
              <'\t\tfor (i = 3 ; i <= NF; i++) {\n'> <'\t\t\tif (p+length ($i)+1 > 48) {\n'> <'\t\t\t\tprintf "\\n\\t\\t\\t\\t\\t%s", $i\n'> 
              <'\t\t\t\tp = 7;\n'> <'\t\t\t} else {\n'> <'\t\t\t\tprintf " %s", $i\n'> <'\t\t\t}\n'> <'\t\t\tp += 1 + length ($i)\n'> 
              <'\t\t}\n'> <'\t\tprintf "\\n"\n'> <'\t\tN3++\n'> <'\t\tif (NF-2 == 1) \n'> <'\t\t\tN4++\n'> <'\t\tif (NF-2 == 2)\n'> 
              <'\t\t\tN5++\n'> <'\t}\n'> <'\t}\n'> <'END\t{\n'> <'\tprintf "Total symbols: %5d\\n",N1+N2+N3\n'> 
              <'\tprintf "unref symbols: %5d\\n",N1\n'> <'\tprintf "undef symbols: %5d\\n",N2\n'> <'\tprintf "1 ref symbols: %5d\\n",N4\n'> 
              <'\tprintf "2 ref symbols: %5d\\n",N5\n'> <'\t}\n'>
            )
          }
        )
      ]
      negated: F
    )
  ]
)