(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Usage: DEFINES=\'list\' HEADERS=\'list\' '> 
                    (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>)
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'  [TARGET_CPU_DEFAULT=\'default\'] mkconfig.sh FILE'>)}]
              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: [64 77]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:output)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [108]
        )
      ]
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name output) <T>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:hg_sed_expr)
          op: assign_op.Equal
          rhs: {(SQ <'y,abcdefghijklmnopqrstuvwxyz./,ABCDEFGHIJKLMNOPQRSTUVWXYZ__,'>)}
          spids: [124]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:header_guard)
          op: assign_op.Equal
          rhs: 
            {<GCC_> 
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(${ Id.VSub_Name output)})
                      (C {<sed>} {<-e>} {(${ Id.VSub_Name hg_sed_expr)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [129]
        )
      ]
    )
    (command.Simple
      words: [{<echo>} {(DQ <'#ifndef '> (${ Id.VSub_Name header_guard))}]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name output) <T>}
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<echo>} {(DQ <'#define '> (${ Id.VSub_Name header_guard))}]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name output) <T>}
        )
      ]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {<x> (DQ ($ Id.VSub_DollarName '$output'))} {<Id.Lit_Equals '='>} 
                      {<x> (DQ <config.h>)}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'#ifdef GENERATOR_FILE'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'#error config.h is for the host, not build, machine.'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'#endif'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
              ]
              do_fork: T
            )
          ]
          spids: [194 211]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$TARGET_CPU_DEFAULT'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'#define TARGET_CPU_DEFAULT ('> ($ Id.VSub_DollarName '$TARGET_CPU_DEFAULT') 
                    <')'>
                  )
                }
              ]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
              ]
              do_fork: T
            )
          ]
          spids: [264 281]
        )
      ]
    )
    (command.ForEach
      iter_names: [def]
      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName '$DEFINES')}])
      body: 
        (command.DoGroup
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} {(DQ <'#ifndef '> ($ Id.VSub_DollarName '$def'))})
                (command.Simple
                  words: [{<sed>} {(SQ <'s/=.*//'>)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name output) <T>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
            (command.Pipeline
              children: [
                (C {<echo>} {(DQ <'# define '> ($ Id.VSub_DollarName '$def'))})
                (command.Simple
                  words: [{<sed>} {(SQ <'s/=/ /'>)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name output) <T>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
            (command.Simple
              words: [{<echo>} {(DQ <'#endif'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$HEADERS'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<set>} {($ Id.VSub_DollarName '$HEADERS')})
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{<auto-> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'#include '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                            ($ Id.VSub_Number '$1') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name output) <T>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<shift>})
                  ]
                  spids: [414 417 440 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ge>} {<1>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(SQ <'#ifdef IN_GCC'>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name output) <T>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ForEach
                      iter_names: [file]
                      iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '$@'))}])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {
                                  (DQ <'# include '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\"'>
                                    ) ($ Id.VSub_DollarName '$file') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                  )
                                }
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {(${ Id.VSub_Name output) <T>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                        )
                    )
                    (command.Simple
                      words: [{<echo>} {(SQ <'#endif'>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name output) <T>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [446 459]
                )
              ]
            )
          ]
          spids: [385 398]
        )
      ]
    )
    (command.Case
      to_match: {($ Id.VSub_DollarName '$output')}
      arms: [
        (case_arm
          pat_list: [{<tm.h>}]
          action: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name output) <T>}
                )
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_span_id: 576
                      stdin_parts: [
                        <
'#if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET\n'
                        >
                        <'# include '>
                        <Id.Right_DoubleQuote '"'>
                        <insn-constants.h>
                        <Id.Right_DoubleQuote '"'>
                        <'\n'>
                        <'# include '>
                        <Id.Right_DoubleQuote '"'>
                        <insn-flags.h>
                        <Id.Right_DoubleQuote '"'>
                        <'\n'>
                        <'#endif\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
          ]
          spids: [546 548 578 -1]
        )
      ]
    )
    (command.Simple
      words: [{<echo>} {(DQ <'#endif /* '> (${ Id.VSub_Name header_guard) <' */'>)}]
      redirects: [
        (redir
          op: <Id.Redir_DGreat '>>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name output) <T>}
        )
      ]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$output')} 
                          {<Id.Lit_RBracket ']'>}
                        )
                        (command.Simple
                          words: [
                            {<cmp>}
                            {(${ Id.VSub_Name output) <T>}
                            {($ Id.VSub_DollarName '$output')}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {($ Id.VSub_DollarName '$output')} {<is>} {<unchanged>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (C {<rm>} {<-f>} {(${ Id.VSub_Name output) <T>})
          ]
          spids: [607 635]
        )
      ]
      else_action: [(C {<mv>} {<-f>} {(${ Id.VSub_Name output) <T>} {($ Id.VSub_DollarName '$output')})]
    )
    (C {<rm>} {<-f>} {<cs-> ($ Id.VSub_DollarName '$output')})
    (command.Simple
      words: [{<echo>} {<timestamp>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {<cs-> ($ Id.VSub_DollarName '$output')}
        )
      ]
      do_fork: T
    )
  ]
)