(CommandList
  children: [
    (C {(export)} {(Lit_VarLike 'PATH=') (/bin) (Lit_Other ':') (/usr/bin)})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:LC_ALL) op:Equal rhs:{(C)} spids:[90])]
      spids: [90]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:FS) op:Equal rhs:{(SQ <': '>)} spids:[96])]
      spids: [96]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:LIBDEPENDS) op:Equal rhs:{(./_libdeps)} spids:[104])]
      spids: [104]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:USRSRC)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Number 1>
                suffix_op: 
                  (StringUnary
                    op_id: VTest_ColonHyphen
                    arg_word: {(Lit_Slash /) (usr) (Lit_Slash /) (src)}
                  )
                spids: [111 118]
              )
            }
          spids: [110]
        )
      ]
      spids: [110]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:LIBS)
          op: Equal
          rhs: 
            {
              (DQ ('\n') ('\tlib\n') ('\tgnu/lib\n') ('\tkerberos5/lib\n') ('\tsecure/lib\n') 
                ('\tusr.bin/lex/lib\n') ('\tcddl/lib\n')
              )
            }
          spids: [123]
        )
      ]
      spids: [123]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:SED_FILTER)
          op: Equal
          rhs: 
            {
              (DQ ('\n') ('sed -E\n') ("    -e's; ;! ;g'\n") ("    -e's;") (Lit_Other '$') (";!;'\n") 
                ("    -e's;-lbsdxml!;lib/libexpat;g'\n") ("    -e's;-lpthread!;lib/libthr;g'\n") ("    -e's;-lm!;lib/msun;g'\n") 
                ("    -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g'\n") ("    -e's;-l(gcc)!;gnu/lib/lib") (Lit_Other '\\') ("1;g'\n") 
                ("    -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g'\n") ("    -e's;-l(asn1|hdb|kdc|heimbase|heimntlm|heimsqlite|hx509|krb5|roken|wind)!;kerberos5/lib/lib") 
                (Lit_Other '\\') ("1;g'\n") ("    -e's;-l(crypto|ssh|ssl)!;secure/lib/lib") (Lit_Other '\\') ("1;g'\n") 
                ("    -e's;-l([^!]+)!;lib/lib") (Lit_Other '\\') ("1;g'\n")
              )
            }
          spids: [144]
        )
      ]
      spids: [144]
    )
    (FuncDef
      name: genlibdepends
      body: 
        (BraceGroup
          children: [
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(cd)} {(${ VSub_Name USRSRC)})
                    (Pipeline
                      children: [
                        (C {(find)} {(-s)} {(${ VSub_Name LIBS)} {(-mindepth)} {(1)} {(-name)} {(Makefile)})
                        (C {(xargs)} {(grep)} {(-l)} {(SQ <'bsd\\.lib\\.mk'>)})
                        (While
                          cond: [(Sentence child:(C {(read)} {(makefile)}) terminator:<Op_Semi ';'>)]
                          body: 
                            (DoGroup
                              children: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:libdir)
                                      op: Equal
                                      rhs: 
                                        {
                                          (CommandSubPart
                                            command_list: 
                                              (CommandList
                                                children: [(C {(dirname)} {(${ VSub_Name makefile)})]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [238 244]
                                          )
                                        }
                                      spids: [237]
                                    )
                                  ]
                                  spids: [237]
                                )
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:deps)
                                      op: Equal
                                      rhs: 
                                        {
                                          (CommandSubPart
                                            command_list: 
                                              (CommandList
                                                children: [
                                                  (C {(cd)} {(${ VSub_Name libdir)})
                                                  (C {(make)} {(-m)} {(${ VSub_Name USRSRC) (/share/mk)} 
                                                    {(-V)} {(LDADD)}
                                                  )
                                                ]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [248 272]
                                          )
                                        }
                                      spids: [247]
                                    )
                                  ]
                                  spids: [247]
                                )
                                (If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (Sentence
                                          child: 
                                            (C {(Lit_Other '[')} {(DQ (${ VSub_Name deps))} 
                                              {(Lit_Other ']')}
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [
                                        (C {(echo)} 
                                          {(${ VSub_Name libdir) (DQ (${ VSub_Name FS)) 
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [
                                                    (Pipeline
                                                      children: [
                                                        (C {(echo)} {(${ VSub_Name deps)})
                                                        (C {(eval)} {(${ VSub_Name SED_FILTER)})
                                                      ]
                                                      negated: F
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [301 320]
                                            )
                                          }
                                        )
                                      ]
                                      spids: [16777215 288]
                                    )
                                  ]
                                  spids: [16777215 323]
                                )
                              ]
                              spids: [234 326]
                            )
                        )
                      ]
                      negated: F
                    )
                  ]
                )
              spids: [185 329]
            )
          ]
          spids: [182]
        )
      spids: [178 181]
    )
    (FuncDef
      name: main
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(${ VSub_Name LIBDEPENDS)} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(genlibdepends)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(${ VSub_Name LIBDEPENDS)}
                          spids: [361]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 356]
                )
              ]
              spids: [16777215 367]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:prebuild_libs)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(awk)} {(-F) (DQ (${ VSub_Name FS))} {(SQ <'{ print $2 }'>)} 
                                    {(${ VSub_Name LIBDEPENDS)}
                                  )
                                  (C {(tr)} {(SQ <' '>)} {(SQ <'\\n'>)})
                                  (C {(sort)} {(-u)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [372 412]
                      )
                    }
                  spids: [371]
                )
              ]
              spids: [371]
            )
            (C {(echo)} {(DQ ('Libraries with dependents:'))})
            (C {(echo)})
            (Pipeline
              children: [
                (C {(echo)} {(${ VSub_Name prebuild_libs)})
                (C {(tr)} {(SQ <' '>)} {(SQ <'\\n'>)})
              ]
              negated: F
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('List of interdependencies:'))})
            (C {(echo)})
            (Pipeline
              children: [
                (ForEach
                  iter_name: lib
                  iter_words: [{(${ VSub_Name prebuild_libs)}]
                  do_arg_iter: F
                  body: 
                    (DoGroup
                      children: [
                        (AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(grep)} {(DQ ('^') (${ VSub_Name lib) (${ VSub_Name FS))} 
                              {(${ VSub_Name LIBDEPENDS)}
                            )
                            (C {(true)})
                          ]
                        )
                      ]
                      spids: [469 493]
                    )
                  spids: [463 467]
                )
                (C {(awk)} {(-F) (DQ (${ VSub_Name FS))} 
                  {
                    (SQ <'{\n'> <'\t\tif ($2 in dependents)\n'> 
                      <'\t\t\tdependents[$2]=dependents[$2]" "$1\n'> <'\t\telse\n'> <'\t\t\tdependents[$2]=$1\n'> <'\t}\n'> <'\tEND {\n'> <'\t\tfor (lib in dependents)\n'> 
                      <'\t\t\tprint dependents[lib]": " lib\n'> <'\t}'>
                    )
                  }
                )
                (C {(sort)})
              ]
              negated: F
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [338]
        )
      spids: [334 337]
    )
    (C {(main)})
  ]
)