(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.Redir
          op: (Token id:Id.Redir_Great val:'3>' span_id:35)
          fd: 3
          arg_word: {(${ Id.VSub_Name OUTDIR) (incl.) ($ Id.VSub_Dollar '$$')}
        )
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'4>' span_id:42)
          fd: 4
          arg_word: {(${ Id.VSub_Name OUTDIR) (smenu.) ($ Id.VSub_Dollar '$$')}
        )
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'5>' span_id:49)
          fd: 5
          arg_word: {(${ Id.VSub_Name OUTDIR) (lmenu.) ($ Id.VSub_Dollar '$$')}
        )
      ]
    )
    (command.ShFunction
      name: build_menu
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:65)
              cond: [
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [{(read)} {(file)} {(node)}]
                      more_env: [(env_pair name:IFS val:{(Id.Lit_Other ':')} spids:[67])]
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:75)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Simple
                      words: [{(echo)} {(DQ ('@include ') ($ Id.VSub_DollarName '$file'))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:87)
                          fd: -1
                          arg_word: {(3)}
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(echo)}
                        {
                          (DQ ('* ') ($ Id.VSub_DollarName '$node') (':: ') 
                            (command_sub
                              left_token: (Token id:Id.Left_Backtick val:'`' span_id:97)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(sed)} {(-n)} 
                                      {
                                        (SQ 
                                          (Token
                                            id: Id.Lit_Chars
                                            val: 's/^@c %MENU% //p'
                                            span_id: 105
                                          )
                                        )
                                      } {($ Id.VSub_DollarName '$file')}
                                    )
                                  ]
                                )
                            )
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:112)
                          fd: -1
                          arg_word: {(4)}
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$AWK')}
                        {
                          (SQ (Token id:Id.Lit_Chars val:'BEGIN { do_menu = 0 }\n' span_id:119) 
                            (Token
                              id: Id.Lit_Chars
                              val: 
'\t  /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 }\n'
                              span_id: 120
                            ) 
                            (Token
                              id: Id.Lit_Chars
                              val: 
'\t  /^@menu/ { printf "\\n%s\\n\\n", node; do_menu = 1; next }\n'
                              span_id: 121
                            ) (Token id:Id.Lit_Chars val:'\t  /^@end menu/ { do_menu = 0 }\n' span_id:122) 
                            (Token
                              id: Id.Lit_Chars
                              val: '\t  do_menu { print }'
                              span_id: 123
                            )
                          )
                        }
                        {($ Id.VSub_DollarName '$file')}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:128)
                          fd: -1
                          arg_word: {(5)}
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: collect_nodes
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {(egrep)} {(SQ (Token id:Id.Lit_Chars val:'^(@c )?@node.*Top' span_id:148))} 
                  {(DQ ($ Id.VSub_At '$@'))} {(/dev/null)}
                )
                (C {(cut)} {(-d) (Id.Lit_Comma ',')} {(-f-2)})
                (C {(sed)} 
                  {
                    (SQ 
                      (Token
                        id: Id.Lit_Chars
                        val: 's/@c //; s/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g'
                        span_id: 172
                      )
                    )
                  }
                )
                (C {($ Id.VSub_DollarName '$AWK')} 
                  {
                    (SQ (Token id:Id.Lit_Chars val:'{ file[$2] = $1; nnode[$2] = $3 }\n' span_id:181) 
                      (Token
                        id: Id.Lit_Chars
                        val: '\tEND  { for (x in file)\n'
                        span_id: 182
                      ) (Token id:Id.Lit_Chars val:'\t\t if (file[x] != "")\n' span_id:183) 
                      (Token
                        id: Id.Lit_Chars
                        val: '\t\t   print file[x] ":" x, file[nnode[x]] ":" nnode[x] }'
                        span_id: 184
                      )
                    )
                  }
                )
                (C {($ Id.VSub_DollarName '$AWK')} {(-f)} {(tsort.awk)})
                (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/_/ /g' span_id:201))})
              ]
              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: (Token id:Id.Left_Backtick val:'`' span_id:223)
                        command_list: 
                          (command.CommandList
                            children: [(C {(basename)} {($ Id.VSub_DollarName '$addon')} {(.texi)})]
                          )
                      )
                    }
                  spids: [222]
                )
              ]
            )
            (command.Simple
              words: [{(echo)} {(DQ ('@set ') ($ Id.VSub_DollarName '$addon'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:236)
                  fd: -1
                  arg_word: {(3)}
                )
              ]
            )
          ]
        )
    )
    (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: (Token id:Id.Op_Semi val:';' span_id:267)
            )
          ]
          action: [
            (command.BraceGroup
              children: [
                (command.Sentence
                  child: (C {(echo)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:276)
                )
                (command.Sentence
                  child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:Add-ons span_id:281))})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:283)
                )
                (command.Sentence
                  child: (C {(echo)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:286)
                )
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:290)
                  fd: -1
                  arg_word: {(4)}
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(egrep)} {(SQ (Token id:Id.Lit_Chars val:'^(@c )?@node.*Top' span_id:298))} 
                  {
                    (command_sub
                      left_token: (Token id:Id.Left_Backtick val:'`' span_id:301)
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Pipeline
                              children: [
                                (C {(echo)} {($ Id.VSub_Number '$2')} {(/dev/null)})
                                (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:317))} 
                                  {(SQ (Token id:Id.Lit_Chars val:'\\n' span_id:321))}
                                )
                                (C {(sort)})
                              ]
                              negated: F
                            )
                          ]
                        )
                    )
                  }
                )
                (C {(cut)} {(-d) (Id.Lit_Comma ',')} {(-f1)})
                (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/@c //;s/@node //' span_id:344))})
                (C {(build_menu)})
              ]
              negated: F
            )
          ]
          spids: [256 269]
        )
      ]
    )
    (command.BraceGroup
      children: [
        (command.Sentence
          child: (C {(echo)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:358)
        )
        (command.Sentence
          child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:Appendices span_id:363))})
          terminator: (Token id:Id.Op_Semi val:';' span_id:365)
        )
        (command.Sentence
          child: (C {(echo)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:368)
        )
      ]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_GreatAnd val:'>&' span_id:372) fd:-1 arg_word:{(4)})
      ]
    )
    (command.Pipeline
      children: [(C {(collect_nodes)} {($ Id.VSub_Number '$3')}) (C {(build_menu)})]
      negated: F
    )
    (command.Simple
      words: [{(exec)}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_GreatAnd val:'3>&' span_id:387) fd:3 arg_word:{(-)})
        (redir.Redir op:(Token id:Id.Redir_GreatAnd val:'4>&' span_id:390) fd:4 arg_word:{(-)})
        (redir.Redir op:(Token id:Id.Redir_GreatAnd val:'5>&' span_id:393) fd:5 arg_word:{(-)})
      ]
    )
    (C {(mv)} {(-f)} {(${ Id.VSub_Name OUTDIR) (incl.) ($ Id.VSub_Dollar '$$')} 
      {(${ Id.VSub_Name OUTDIR) (chapters.texi)}
    )
    (command.BraceGroup
      children: [
        (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'@menu' span_id:419))})
        (C {($ Id.VSub_DollarName '$AWK')} {(-F) (Id.Lit_Other ':')} 
          {
            (SQ (Token id:Id.Lit_Chars val:'\n' span_id:429) 
              (Token id:Id.Lit_Chars val:'  /^\\*/ {\n' span_id:430) (Token id:Id.Lit_Chars val:'    printf("%-32s", $1 "::");\n' span_id:431) 
              (Token id:Id.Lit_Chars val:'    x = split($3, word, " ");\n' span_id:432) (Token id:Id.Lit_Chars val:'    hpos = 34;\n' span_id:433) 
              (Token
                id: Id.Lit_Chars
                val: '    for (i = 1; i <= x; i++) {\n'
                span_id: 434
              ) (Token id:Id.Lit_Chars val:'      hpos += length(word[i]) + 1;\n' span_id:435) 
              (Token id:Id.Lit_Chars val:'      if (hpos > 78) {\n' span_id:436) (Token id:Id.Lit_Chars val:'\tprintf("\\n%34s", "");\n' span_id:437) 
              (Token
                id: Id.Lit_Chars
                val: '\thpos = 35 + length(word[i]);\n'
                span_id: 438
              ) (Token id:Id.Lit_Chars val:'      }\n' span_id:439) 
              (Token id:Id.Lit_Chars val:'      printf(" %s", word[i]);\n' span_id:440) (Token id:Id.Lit_Chars val:'    }\n' span_id:441) 
              (Token id:Id.Lit_Chars val:'    print ".";\n' span_id:442) (Token id:Id.Lit_Chars val:'  }\n' span_id:443) (Token id:Id.Lit_Chars val:'\n' span_id:444) 
              (Token id:Id.Lit_Chars val:'  !/^\\*/ { print; }\n' span_id:445) (Token id:Id.Lit_Chars val:' ' span_id:446)
            )
          } {(${ Id.VSub_Name OUTDIR) (smenu.) ($ Id.VSub_Dollar '$$')}
        )
        (command.Simple
          words: [{(cat)}]
          redirects: [
            (redir.HereDoc
              op: (Token id:Id.Redir_DLess val:'<<' span_id:458)
              fd: -1
              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')
              ]
            )
          ]
        )
        (C {(cat)} {(${ Id.VSub_Name OUTDIR) (lmenu.) ($ Id.VSub_Dollar '$$')})
        (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'@end detailmenu' span_id:492))})
        (command.Sentence
          child: (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'@end menu' span_id:499))})
          terminator: (Token id:Id.Op_Semi val:';' span_id:501)
        )
      ]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:505)
          fd: -1
          arg_word: {(${ 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 '$$')})
  ]
)