(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OUTDIR)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [4]
        )
      ]
    )
    (C {<shift>})
    (C {<trap>} {(DQ <'rm -f '> (${ Id.VSub_Name OUTDIR) <'*.'> ($ Id.VSub_Dollar '$$') <'; exit 1'>)} 
      {<1>} {<2>} {<15>}
    )
    (command.Simple
      words: [{<exec>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '3>'>
          loc: (redir_loc.Fd fd:3)
          arg: {(${ Id.VSub_Name OUTDIR) <incl.> ($ Id.VSub_Dollar '$$')}
        )
        (redir
          op: <Id.Redir_Great '4>'>
          loc: (redir_loc.Fd fd:4)
          arg: {(${ Id.VSub_Name OUTDIR) <smenu.> ($ Id.VSub_Dollar '$$')}
        )
        (redir
          op: <Id.Redir_Great '5>'>
          loc: (redir_loc.Fd fd:5)
          arg: {(${ Id.VSub_Name OUTDIR) <lmenu.> ($ Id.VSub_Dollar '$$')}
        )
      ]
      do_fork: T
    )
    (command.ShFunction
      name: build_menu
      body: 
        (BraceGroup
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [{<read>} {<file>} {<node>}]
                      more_env: [(env_pair name:IFS val:{<Id.Lit_Colon ':'>} spids:[67])]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'@include '> ($ Id.VSub_DollarName '$file'))}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'* '> ($ Id.VSub_DollarName '$node') <':: '> 
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: 
                                (C {<sed>} {<-n>} {(SQ <'s/^@c %MENU% //p'>)} 
                                  {($ Id.VSub_DollarName '$file')}
                                )
                            )
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<4>})]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$AWK')}
                        {
                          (SQ <'BEGIN { do_menu = 0 }\n'> 
                            <'\t  /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 }\n'> <'\t  /^@menu/ { printf "\\n%s\\n\\n", node; do_menu = 1; next }\n'> 
                            <'\t  /^@end menu/ { do_menu = 0 }\n'> <'\t  do_menu { print }'>
                          )
                        }
                        {($ Id.VSub_DollarName '$file')}
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<5>})]
                      do_fork: T
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: collect_nodes
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<egrep>} {(SQ <'^(@c )?@node.*Top'>)} {(DQ ($ Id.VSub_At '$@'))} {<'/dev/null'>})
                (C {<cut>} {<-d> <Id.Lit_Comma ','>} {<-f-2>})
                (C {<sed>} {(SQ <'s/@c //; s/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g'>)})
                (C {($ Id.VSub_DollarName '$AWK')} 
                  {
                    (SQ <'{ file[$2] = $1; nnode[$2] = $3 }\n'> <'\tEND  { for (x in file)\n'> 
                      <'\t\t if (file[x] != "")\n'> <'\t\t   print file[x] ":" x, file[nnode[x]] ":" nnode[x] }'>
                    )
                  }
                )
                (C {($ Id.VSub_DollarName '$AWK')} {<-f>} {<tsort.awk>})
                (C {<sed>} {(SQ <'s/_/ /g'>)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ForEach
      iter_name: addon
      iter_words: [{($ Id.VSub_Number '$2')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:addon)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$addon')} {<.texi>})
                      )
                    }
                  spids: [222]
                )
              ]
            )
            (command.Simple
              words: [{<echo>} {(DQ <'@set '> ($ Id.VSub_DollarName '$addon'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
              do_fork: T
            )
          ]
        )
    )
    (command.Pipeline
      children: [(C {<collect_nodes>} {($ Id.VSub_Number '$1')}) (C {<build_menu>})]
      negated: F
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>})
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (BraceGroup
              children: [
                (command.Sentence child:(C {<echo>}) terminator:<Id.Op_Semi _>)
                (command.Sentence
                  child: (C {<echo>} {(SQ <Add-ons>)})
                  terminator: <Id.Op_Semi _>
                )
                (command.Sentence child:(C {<echo>}) terminator:<Id.Op_Semi _>)
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<4>})]
            )
            (command.Pipeline
              children: [
                (C {<egrep>} {(SQ <'^(@c )?@node.*Top'>)} 
                  {
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {($ Id.VSub_Number '$2')} {<'/dev/null'>})
                            (C {<tr>} {(SQ <' '>)} {(SQ <'\\n'>)})
                            (C {<sort>})
                          ]
                          negated: F
                        )
                    )
                  }
                )
                (C {<cut>} {<-d> <Id.Lit_Comma ','>} {<-f1>})
                (C {<sed>} {(SQ <'s/@c //;s/@node //'>)})
                (C {<build_menu>})
              ]
              negated: F
            )
          ]
          spids: [256 269]
        )
      ]
    )
    (BraceGroup
      children: [
        (command.Sentence child:(C {<echo>}) terminator:<Id.Op_Semi _>)
        (command.Sentence child:(C {<echo>} {(SQ <Appendices>)}) terminator:<Id.Op_Semi _>)
        (command.Sentence child:(C {<echo>}) terminator:<Id.Op_Semi _>)
      ]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<4>})]
    )
    (command.Pipeline
      children: [(C {<collect_nodes>} {($ Id.VSub_Number '$3')}) (C {<build_menu>})]
      negated: F
    )
    (command.Simple
      words: [{<exec>}]
      redirects: [
        (redir op:<Id.Redir_GreatAnd '3>&'> loc:(redir_loc.Fd fd:3) arg:{<->})
        (redir op:<Id.Redir_GreatAnd '4>&'> loc:(redir_loc.Fd fd:4) arg:{<->})
        (redir op:<Id.Redir_GreatAnd '5>&'> loc:(redir_loc.Fd fd:5) arg:{<->})
      ]
      do_fork: T
    )
    (C {<mv>} {<-f>} {(${ Id.VSub_Name OUTDIR) <incl.> ($ Id.VSub_Dollar '$$')} 
      {(${ Id.VSub_Name OUTDIR) <chapters.texi>}
    )
    (BraceGroup
      children: [
        (C {<echo>} {(SQ <'@menu'>)})
        (C {($ Id.VSub_DollarName '$AWK')} {<-F> <Id.Lit_Colon ':'>} 
          {
            (SQ <'\n'> <'  /^\\*/ {\n'> <'    printf("%-32s", $1 "::");\n'> 
              <'    x = split($3, word, " ");\n'> <'    hpos = 34;\n'> <'    for (i = 1; i <= x; i++) {\n'> <'      hpos += length(word[i]) + 1;\n'> 
              <'      if (hpos > 78) {\n'> <'\tprintf("\\n%34s", "");\n'> <'\thpos = 35 + length(word[i]);\n'> <'      }\n'> 
              <'      printf(" %s", word[i]);\n'> <'    }\n'> <'    print ".";\n'> <'  }\n'> <'\n'> <'  !/^\\*/ { print; }\n'> <' '>
            )
          } {(${ Id.VSub_Name OUTDIR) <smenu.> ($ Id.VSub_Dollar '$$')}
        )
        (command.Simple
          words: [{<cat>}]
          redirects: [
            (redir
              op: <Id.Redir_DLess '<<'>
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.MultiLine
                  here_begin: {<EOF>}
                  here_end_span_id: 478
                  stdin_parts: [
                    <'* Free Manuals::\t\t Free Software Needs Free Documentation.\n'>
                    <
'* Copying::                      The GNU Lesser General Public License says\n'
                    >
                    <
'                                  how you can copy and share the GNU C Library.\n'
                    >
                    <'* Documentation License::        This manual is under the GNU Free\n'>
                    <'                                  Documentation License.\n'>
                    <'\n'>
                    <'Indices\n'>
                    <'\n'>
                    <'* Concept Index::                Index of concepts and names.\n'>
                    <'* Type Index::                   Index of types and type qualifiers.\n'>
                    <
'* Function Index::               Index of functions and function-like macros.\n'
                    >
                    <
'* Variable Index::               Index of variables and variable-like macros.\n'
                    >
                    <'* File Index::                   Index of programs and files.\n'>
                    <'\n'>
                    <' @detailmenu\n'>
                    <' --- The Detailed Node Listing ---\n'>
                  ]
                )
            )
          ]
          do_fork: T
        )
        (C {<cat>} {(${ Id.VSub_Name OUTDIR) <lmenu.> ($ Id.VSub_Dollar '$$')})
        (C {<echo>} {(SQ <'@end detailmenu'>)})
        (command.Sentence child:(C {<echo>} {(SQ <'@end menu'>)}) terminator:<Id.Op_Semi _>)
      ]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {(${ Id.VSub_Name OUTDIR) <top-menu.texi.> ($ Id.VSub_Dollar '$$')}
        )
      ]
    )
    (C {<mv>} {<-f>} {(${ Id.VSub_Name OUTDIR) <top-menu.texi.> ($ Id.VSub_Dollar '$$')} 
      {(${ Id.VSub_Name OUTDIR) <top-menu.texi>}
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name OUTDIR) <Id.Lit_Star '*'> <.> ($ Id.VSub_Dollar '$$')})
  ]
)