(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TOOLDIR='> name:TOOLDIR)
          op: assign_op.Equal
          rhs: {(DQ (${ Id.VSub_Name SRC) <'/cmd/sgs/tools/'>)}
          spids: [80]
        )
      ]
      redirects: []
    )
    (C {<rm>} {<-f>} {<CATA_MSG_INTL_LIST>} {<CATA_MSG_ORIG_LIST>})
    (C {<rm>} {<-f>} {<MSG_INTL_LIST>} {<MSG_ORIG_LIST>})
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: (condition.Shell commands:[(C {<getopts>} {(DQ <'m:'>)} {<Arg>})])
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName Arg)}
              arms: [
                (case_arm
                  pat_list: [{<m>}]
                  action: [
                    (C {<nawk>} {<-f>} {(${ Id.VSub_Name TOOLDIR) <'/catalog.awk'>} 
                      {($ Id.VSub_DollarName OPTARG)}
                    )
                  ]
                  spids: [135 136 149 -1]
                )
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'> ch:'?')}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'usage: chkmsg -m msgfile source-files'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [152 153 167 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (C {<shift>} 
      {
        (command_sub
          left_token: <Id.Left_Backtick '`'>
          child: (C {<expr>} {($ Id.VSub_DollarName OPTIND)} {<->} {<1>})
          right: <Id.Backtick_Right '`'>
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'usage: chkmsg -m msgfile source-files'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [189 202]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-s>} {<CATA_MSG_INTL_LIST>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Pipeline
              children: [
                (C {<sed>} {<-e>} {(DQ <'s/_32'> <Id.Lit_Dollar '$'> <'//'>)} {<-e>} 
                  {(DQ <'s/_64'> <Id.Lit_Dollar '$'> <'//'>)} {<CATA_MSG_INTL_LIST>}
                )
                (C {<sort>})
                (command.Simple
                  words: [{<uniq>}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})]
                  more_env: []
                  do_fork: T
                )
              ]
              negated: F
              stderr_indices: []
            )
            (C {<mv>} {<_TMP>} {<CATA_MSG_INTL_LIST>})
          ]
          spids: [231 243]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-s>} {<CATA_MSG_ORIG_LIST>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Pipeline
              children: [
                (C {<sed>} {<-e>} {(DQ <'s/_32'> <Id.Lit_Dollar '$'> <'//'>)} {<-e>} 
                  {(DQ <'s/_64'> <Id.Lit_Dollar '$'> <'//'>)} {<CATA_MSG_ORIG_LIST>}
                )
                (C {<sort>})
                (command.Simple
                  words: [{<uniq>}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})]
                  more_env: []
                  do_fork: T
                )
              ]
              negated: F
              stderr_indices: []
            )
            (C {<mv>} {<_TMP>} {<CATA_MSG_ORIG_LIST>})
          ]
          spids: [287 299]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<nawk>} {<-f>} {(${ Id.VSub_Name TOOLDIR) <'/getmessage.awk'>} {($ Id.VSub_Star '*')})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<MSG_INTL_LIST>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Pipeline
              children: [
                (C {<sed>} {<-e>} {(DQ <'s/_32'> <Id.Lit_Dollar '$'> <'//'>)} {<-e>} 
                  {(DQ <'s/_64'> <Id.Lit_Dollar '$'> <'//'>)} {<MSG_INTL_LIST>}
                )
                (C {<sort>})
                (command.Simple
                  words: [{<uniq>}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})]
                  more_env: []
                  do_fork: T
                )
              ]
              negated: F
              stderr_indices: []
            )
            (C {<mv>} {<_TMP>} {<MSG_INTL_LIST>})
          ]
          spids: [365 377]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<MSG_ORIG_LIST>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Pipeline
              children: [
                (C {<sed>} {<-e>} {(DQ <'s/_32'> <Id.Lit_Dollar '$'> <'//'>)} {<-e>} 
                  {(DQ <'s/_64'> <Id.Lit_Dollar '$'> <'//'>)} {<MSG_ORIG_LIST>}
                )
                (C {<sort>})
                (command.Simple
                  words: [{<uniq>}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})]
                  more_env: []
                  do_fork: T
                )
              ]
              negated: F
              stderr_indices: []
            )
            (C {<mv>} {<_TMP>} {<MSG_ORIG_LIST>})
          ]
          spids: [421 433]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Error='> name:Error)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [487]
        )
      ]
      redirects: []
    )
    (command.Simple
      words: [{<comm>} {<-23>} {<CATA_MSG_INTL_LIST>} {<MSG_INTL_LIST>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})
        (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})
      ]
      more_env: []
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<_TMP>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>})
            (C {<echo>} {(DQ <'messages exist between _START_ and _END_ but do not use MSG_INTL()'>)})
            (command.Pipeline
              children: [(C {<cat>} {<_TMP>}) (C {<sed>} {(DQ <'s/^/\t/'>)})]
              negated: F
              stderr_indices: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Error='> name:Error)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [553]
                )
              ]
              redirects: []
            )
          ]
          spids: [516 527]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<rm>} {<-f>} {<_TMP>})
    (command.Simple
      words: [{<comm>} {<-13>} {<CATA_MSG_INTL_LIST>} {<MSG_INTL_LIST>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})
        (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})
      ]
      more_env: []
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<_TMP>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>})
            (C {<echo>} {(DQ <'use of MSG_INTL() but messages do not exist between _START_ and _END_'>)})
            (command.Pipeline
              children: [(C {<cat>} {<_TMP>}) (C {<sed>} {(DQ <'s/^/\t/'>)})]
              negated: F
              stderr_indices: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Error='> name:Error)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [618]
                )
              ]
              redirects: []
            )
          ]
          spids: [581 592]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<rm>} {<-f>} {<_TMP>})
    (command.Simple
      words: [{<comm>} {<-23>} {<CATA_MSG_ORIG_LIST>} {<MSG_ORIG_LIST>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})
        (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})
      ]
      more_env: []
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<_TMP>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>})
            (C {<echo>} {(DQ <'messages exist after _END_ but do not use MSG_ORIG()'>)})
            (command.Pipeline
              children: [(C {<cat>} {<_TMP>}) (C {<sed>} {(DQ <'s/^/\t/'>)})]
              negated: F
              stderr_indices: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Error='> name:Error)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [692]
                )
              ]
              redirects: []
            )
          ]
          spids: [655 666]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<rm>} {<-f>} {<_TMP>})
    (command.Simple
      words: [{<comm>} {<-13>} {<CATA_MSG_ORIG_LIST>} {<MSG_ORIG_LIST>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<_TMP>})
        (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})
      ]
      more_env: []
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<Id.Lit_LBracket '['>} {<-s>} {<_TMP>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>})
            (C {<echo>} {(DQ <'use of MSG_ORIG() but messages do not exist after _END_'>)})
            (command.Pipeline
              children: [(C {<cat>} {<_TMP>}) (C {<sed>} {(DQ <'s/^/\t/'>)})]
              negated: F
              stderr_indices: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Error='> name:Error)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [757]
                )
              ]
              redirects: []
            )
          ]
          spids: [720 731]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<rm>} {<-f>} {<_TMP>})
    (C {<rm>} {<-f>} {<CATA_MSG_INTL_LIST>} {<CATA_MSG_ORIG_LIST>})
    (C {<rm>} {<-f>} {<MSG_INTL_LIST>} {<MSG_ORIG_LIST>})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_DollarName Error)})
  ]
)