(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ok='> name:ok)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [63]
        )
      ]
      redirects: []
    )
    (command.ForEach
      iter_names: [i]
      iterable: 
        (for_iter.Words
          words: [
            {<-x>}
            {<'/lib/ld.so'>}
            {<'/lib/ld-'> <Id.Lit_Star '*'> <.so>}
            {<'/usr/lib/ld.so'>}
            {<'/lib/rld'>}
            {<-f>}
            {<'/usr/shlib/libc.so'>}
            {<'/shlib/libc.so'>}
            {<'/usr/lib/libc.so'>}
            {<-r>}
            {<'/usr/shlib/libc.so'>}
            {<'/shlib/libc.so'>}
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName i)}
              arms: [
                (case_arm
                  pat_list: [{<-> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'op='> name:op)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_DollarName i)}
                              spids: [117]
                            )
                          ]
                          redirects: []
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Continue continue>)
                  ]
                  spids: [113 115 123 -1]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {($ Id.VSub_DollarName op)} {($ Id.VSub_DollarName i)})]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ok='> name:ok)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [140]
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Break break>)
                  ]
                  spids: [129 138]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<set>} {<x>} 
              {($ Id.VSub_DollarName i) <.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> 
                <Id.Lit_Star '*'>
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {($ Id.VSub_DollarName op)} {($ Id.VSub_Number 2)})]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ok='> name:ok)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [173]
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Break break>)
                  ]
                  spids: [162 171]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<test>} {(DQ <0>)} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                  {(DQ ($ Id.VSub_DollarName ok))}
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                  op: assign_op.Equal
                  rhs: {<lib> <Id.Lit_Colon ':'> <LD_LIBRARY_PATH>}
                  spids: [201]
                )
              ]
              redirects: []
            )
            (command.Case
              to_match: 
                {
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    child: (C {<package>})
                    right: <Id.Backtick_Right '`'>
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{<sgi.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {<test>} {<-d>} {<'/lib32'>})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'libpath='>
                                      name: libpath
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ <'lib32:LD_LIBRARYN32_PATH:sgi.mips3|sgi.*-n32,'> 
                                        ($ Id.VSub_DollarName libpath)
                                      )
                                    }
                                  spids: [233]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [222 231]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {<test>} {<-d>} {<'/lib64'>})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'libpath='>
                                      name: libpath
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ <'lib64:LD_LIBRARY64_PATH:sgi.mips[4-9]|sgi.*-64,'> 
                                        ($ Id.VSub_DollarName libpath)
                                      )
                                    }
                                  spids: [254]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [243 252]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [218 220 264 -1]
                )
                (case_arm
                  pat_list: [{<sol> <Id.Lit_Star '*'> <.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {<test>} {<-d>} {<'/lib/32'>})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'libpath='>
                                      name: libpath
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ <'lib/32:LD_LIBRARY_PATH_32,'> 
                                        ($ Id.VSub_DollarName libpath)
                                      )
                                    }
                                  spids: [284]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [273 282]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {<test>} {<-d>} {<'/lib/64'>})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'libpath='>
                                      name: libpath
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ <'lib/64:LD_LIBRARY_PATH_64:sol.*64*,'> 
                                        ($ Id.VSub_DollarName libpath)
                                      )
                                    }
                                  spids: [305]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [294 303]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [267 271 315 -1]
                )
              ]
              redirects: []
            )
          ]
          spids: [184 199]
        )
        (if_arm
          cond: (condition.Shell commands:[(C {<test>} {<-x>} {<'/lib/dld.sl'>})])
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                  op: assign_op.Equal
                  rhs: {<lib> <Id.Lit_Colon ':'> <SHLIB_PATH>}
                  spids: [330]
                )
              ]
              redirects: []
            )
          ]
          spids: [320 328]
        )
        (if_arm
          cond: (condition.Shell commands:[(C {<test>} {<-x>} {<'/usr/lib/dyld'>})])
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                  op: assign_op.Equal
                  rhs: {<lib> <Id.Lit_Colon ':'> <DYLD_LIBRARY_PATH>}
                  spids: [345]
                )
              ]
              redirects: []
            )
          ]
          spids: [335 343]
        )
      ]
      else_action: [
        (command.Case
          to_match: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<package>})
                right: <Id.Backtick_Right '`'>
              )
            }
          arms: [
            (case_arm
              pat_list: [{<ibm.> <Id.Lit_Star '*'>} {<mvs.> <Id.Lit_Star '*'>}]
              action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                      op: assign_op.Equal
                      rhs: {<lib> <Id.Lit_Colon ':'> <LIBPATH>}
                      spids: [371]
                    )
                  ]
                  redirects: []
                )
              ]
              spids: [363 368 377 -1]
            )
            (case_arm
              pat_list: [{<Id.Lit_Star '*'>}]
              action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                      op: assign_op.Equal
                      rhs: (rhs_word.Empty)
                      spids: [383]
                    )
                  ]
                  redirects: []
                )
              ]
              spids: [380 381 386 -1]
            )
          ]
          redirects: []
        )
      ]
      redirects: []
    )
    (command.Case
      to_match: {($ Id.VSub_DollarName libpath)}
      arms: [
        (case_arm
          pat_list: [{(SQ )}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'libpath='> name:libpath)
                  op: assign_op.Equal
                  rhs: {<bin>}
                  spids: [403]
                )
              ]
              redirects: []
            )
          ]
          spids: [399 401 406 -1]
        )
      ]
      redirects: []
    )
    (C {<echo>} 
      {
        (DQ <'#define CONF_LIBPATH\t'> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') ($ Id.VSub_DollarName libpath) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"')
        )
      }
    )
  ]
)