(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: (Token id:Id.ControlFlow_Exit val:exit span_id:82)
              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 (Token id:Id.Lit_Chars val:'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"' span_id:117))} {(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: (Token id:Id.Left_DollarParen val:'$(' span_id:137)
                          command_list: 
                            (command.CommandList
                              children: [(C {(basename)} {(DQ ($ Id.VSub_DollarName '$i'))})]
                            )
                        )
                      )
                    }
                  spids: [135]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(sed)}
                    {(-r)}
                    {(-e)}
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 's/([ \\t(])(__user|__force|__iomem)[ \\t]/\\1/g'
                          span_id: 156
                        )
                      )
                    }
                    {(-e)}
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 's/__attribute_const__([ \\t]|$)/\\1/g'
                          span_id: 164
                        )
                      )
                    }
                    {(-e)}
                    {(SQ (Token id:Id.Lit_Chars val:'s@^#include <linux/compiler.h>@@' span_id:172))}
                    {(-e)}
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 
's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\\1__attribute__((packed))\\2/g'
                          span_id: 180
                        )
                      )
                    }
                    {(-e)}
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 's/(^|[ \\t(])(inline|asm|volatile)([ \\t(]|$)/\\1__\\2__\\3/g'
                          span_id: 188
                        )
                      )
                    }
                    {(-e)}
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 's@#(ifndef|define|endif[ \\t]*/[*])[ \\t]*_UAPI@#\\1 @'
                          span_id: 196
                        )
                      )
                    }
                    {(DQ ($ Id.VSub_DollarName '$SRCDIR') (/) ($ Id.VSub_DollarName '$i'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:207)
                      fd: -1
                      arg_word: 
                        {
                          (DQ ($ Id.VSub_DollarName '$OUTDIR') (/) ($ Id.VSub_DollarName '$FILE') (.sed))
                        }
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:218)
                  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.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:238)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$OUTDIR') (/) ($ Id.VSub_DollarName '$FILE'))}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(-gt)} {(1)} {(Id.Lit_RBracket ']')})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:259)
                  arg_word: {(1)}
                )
              ]
            )
            (C {(rm)} {(-f)} 
              {(DQ ($ Id.VSub_DollarName '$OUTDIR') (/) ($ Id.VSub_DollarName '$FILE') (.sed))}
            )
          ]
        )
    )
    (C {(trap)} {(-)} {(EXIT)})
  ]
)