(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-lt>} {<2>} {<Id.Lit_RBracket ']'>})
          ]
          action: [
            (C {<echo>} {(DQ <'Usage: headers_install.sh OUTDIR SRCDIR [FILES...]'>)})
            (C {<echo>})
            (C {<echo>} {(DQ <'Prepares kernel header files for use by user space, by removing'>)})
            (C {<echo>} {(DQ <'all compiler.h definitions and #includes, removing any'>)})
            (C {<echo>} {(DQ <'#ifdef __KERNEL__ sections, and putting __underscores__ around'>)})
            (C {<echo>} {(DQ <'asm/inline/volatile keywords.'>)})
            (C {<echo>})
            (C {<echo>} {(DQ <'OUTDIR: directory to write each userspace header FILE to.'>)})
            (C {<echo>} {(DQ <'SRCDIR: source directory where files are picked.'>)})
            (C {<echo>} {(DQ <'FILES:  list of header files to operate on.'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [4 16]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OUTDIR)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [93]
        )
      ]
    )
    (C {<shift>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SRCDIR)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [100]
        )
      ]
    )
    (C {<shift>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILE)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [112]
        )
      ]
    )
    (C {<trap>} {(SQ <'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"'>)} {<EXIT>})
    (command.ForEach
      iter_name: i
      iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$i'))})
                        )
                      )
                    }
                  spids: [135]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {<sed>}
                    {<-r>}
                    {<-e>}
                    {(SQ <'s/([ \\t(])(__user|__force|__iomem)[ \\t]/\\1/g'>)}
                    {<-e>}
                    {(SQ <'s/__attribute_const__([ \\t]|$)/\\1/g'>)}
                    {<-e>}
                    {(SQ <'s@^#include <linux/compiler.h>@@'>)}
                    {<-e>}
                    {
                      (SQ 
                        <
's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\\1__attribute__((packed))\\2/g'
                        >
                      )
                    }
                    {<-e>}
                    {(SQ <'s/(^|[ \\t(])(inline|asm|volatile)([ \\t(]|$)/\\1__\\2__\\3/g'>)}
                    {<-e>}
                    {(SQ <'s@#(ifndef|define|endif[ \\t]*/[*])[ \\t]*_UAPI@#\\1 @'>)}
                    {(DQ ($ Id.VSub_DollarName '$SRCDIR') <'/'> ($ Id.VSub_DollarName '$i'))}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: 
                        {
                          (DQ ($ Id.VSub_DollarName '$OUTDIR') <'/'> ($ Id.VSub_DollarName '$FILE') 
                            <.sed>
                          )
                        }
                    )
                  ]
                  do_fork: T
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (command.Simple
              words: [
                {<'scripts/unifdef'>}
                {<-U__KERNEL__>}
                {<-D__EXPORTED_HEADERS__>}
                {(DQ ($ Id.VSub_DollarName '$OUTDIR') <'/'> ($ Id.VSub_DollarName '$FILE') <.sed>)}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ ($ Id.VSub_DollarName '$OUTDIR') <'/'> ($ Id.VSub_DollarName '$FILE'))}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (C {<rm>} {<-f>} 
              {(DQ ($ Id.VSub_DollarName '$OUTDIR') <'/'> ($ Id.VSub_DollarName '$FILE') <.sed>)}
            )
          ]
        )
    )
    (C {<trap>} {<->} {<EXIT>})
  ]
)