(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'input='> name:input)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_Backtick '`'>
                  child: (C {<cat>})
                  right: <Id.Backtick_Right '`'>
                )
              )
            }
          spids: [86]
        )
      ]
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName input))} {<Id.Lit_RBracket ']'>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (C {<echo>} 
      {
        (DQ <'/*'> <Id.Lit_BadBackslash '\\'> <n> 
          <' * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.'> <Id.Lit_BadBackslash '\\'> <n> <' * Use is subject to license terms.'> <Id.Lit_BadBackslash '\\'> <n> 
          <' */'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> <'#pragma ident'> <Id.Lit_BadBackslash '\\'> 
          <t> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <'%Z%%M%'> 
          <Id.Lit_BadBackslash '\\'> <'t%I%'> <Id.Lit_BadBackslash '\\'> <'t%E% SMI'> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> <'#include <strings.h>\n'> 
          <'#include <fmd_error.h>\n'> <Id.Lit_BadBackslash '\\'> <n> <'static const char *const _fmd_ereports[] = {'>
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pattern='> name:pattern)
          op: assign_op.Equal
          rhs: {(SQ <'^[ ]*EFMD_\\([A-Z0-9_]*\\).*,*'>)}
          spids: [160]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'replace='> name:replace)
          op: assign_op.Equal
          rhs: {(SQ <'\t"ereport.fm.fmd.\\1",'>)}
          spids: [165]
        )
      ]
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Pipeline
          children: [
            (C {<echo>} {(DQ ($ Id.VSub_DollarName input))})
            (C {<sed>} {<-n>} 
              {(DQ <'s/'> ($ Id.VSub_DollarName pattern) <'/'> ($ Id.VSub_DollarName replace) <'/p'>)}
            )
            (C {<tr>} {(SQ <'[A-Z]'>)} {(SQ <'[a-z]'>)})
          ]
          negated: F
          stderr_indices: []
        )
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (C {<echo>} 
      {
        (DQ <'};'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> 
          <'static const char *const _fmd_errstrs[] = {'>
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pattern='> name:pattern)
          op: assign_op.Equal
          rhs: {(SQ <'^[ ]*EFMD_[A-Z0-9_]*.*\\* \\(.*\\) \\*.*'>)}
          spids: [225]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'replace='> name:replace)
          op: assign_op.Equal
          rhs: {(SQ <'\t"\\1",'>)}
          spids: [230]
        )
      ]
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Pipeline
          children: [
            (C {<echo>} {(DQ ($ Id.VSub_DollarName input))})
            (C {<sed>} {<-n>} 
              {(DQ <'s/'> ($ Id.VSub_DollarName pattern) <'/'> ($ Id.VSub_DollarName replace) <'/p'>)}
            )
          ]
          negated: F
          stderr_indices: []
        )
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (C {<echo>} 
      {
        (DQ <'};'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> 
          <'static const int _fmd_nereports ='> <Id.Lit_BadBackslash '\\'> <n> <'    sizeof (_fmd_ereports) / sizeof (_fmd_ereports[0]);'> 
          <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> <'static const int _fmd_nerrstrs ='> <Id.Lit_BadBackslash '\\'> <n> 
          <'    sizeof (_fmd_errstrs) / sizeof (_fmd_errstrs[0]);'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> <'const char *\n'> 
          <'fmd_errclass(int err)\n'> <'{\n'> <'\tconst char *c;\n'> <'\n'> 
          <'\tif (err >= EFMD_UNKNOWN && (err - EFMD_UNKNOWN) < _fmd_nereports)\n'> <'\t\tc = _fmd_ereports[err - EFMD_UNKNOWN];\n'> <'\telse\n'> <'\t\tc = _fmd_ereports[0];\n'> <'\n'> 
          <'\treturn (c);\n'> <'}\n'> <'\n'> <'const char *\n'> <'fmd_strerror(int err)\n'> <'{\n'> <'\tconst char *s;\n'> <'\n'> 
          <'\tif (err >= EFMD_UNKNOWN && (err - EFMD_UNKNOWN) < _fmd_nerrstrs)\n'> <'\t\ts = _fmd_errstrs[err - EFMD_UNKNOWN];\n'> 
          <'\telse if (err < 0 || (s = strerror(err)) == NULL)\n'> <'\t\ts = _fmd_errstrs[0];\n'> <'\n'> <'\treturn (s);\n'> <'}\n'> <'\n'> <'int\n'> 
          <'fmd_set_errno(int err)\n'> <'{\n'> <'\terrno = err;\n'> <'\treturn (-1);\n'> <'}'>
        )
      }
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)