(command.CommandList
  children: [
    (command.ShFunction
      name: add_to_manpath
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$manpath'))}
              arms: [
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <Id.Lit_Other ':'> ($ Id.VSub_Number '$1')}]
                  action: [
                    (C {<decho>} {(DQ <'  Skipping duplicate manpath entry '> ($ Id.VSub_Number '$1'))} 
                      {<2>}
                    )
                  ]
                  spids: [107 110 121 -1]
                )
                (case_arm
                  pat_list: [{($ Id.VSub_Number '$1') <Id.Lit_Other ':'> <Id.Lit_Star '*'>}]
                  action: [
                    (C {<decho>} {(DQ <'  Skipping duplicate manpath entry '> ($ Id.VSub_Number '$1'))} 
                      {<2>}
                    )
                  ]
                  spids: [124 127 138 -1]
                )
                (case_arm
                  pat_list: [
                    {<Id.Lit_Star '*'> <Id.Lit_Other ':'> ($ Id.VSub_Number '$1') <Id.Lit_Other ':'> 
                      <Id.Lit_Star '*'>
                    }
                  ]
                  action: [
                    (C {<decho>} {(DQ <'  Skipping duplicate manpath entry '> ($ Id.VSub_Number '$1'))} 
                      {<2>}
                    )
                  ]
                  spids: [141 146 157 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ ($ Id.VSub_Number '$1'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<decho>} {(DQ <'  Adding '> ($ Id.VSub_Number '$1') <' to manpath'>)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:manpath)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$manpath') <':'> 
                                        ($ Id.VSub_Number '$1')
                                      )
                                    }
                                  spids: [188]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [163 176]
                        )
                      ]
                    )
                  ]
                  spids: [160 161 204 -1]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: build_manlocales
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$MANLOCALES'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [235 248]
                )
              ]
            )
            (C {<parse_configs>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MANLOCALES)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name manlocales>
                        suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<':'>})
                      )
                    }
                  spids: [266]
                )
              ]
            )
            (C {<decho>} {(DQ <'Available manual locales: '> ($ Id.VSub_DollarName '$MANLOCALES'))})
          ]
        )
    )
    (command.ShFunction
      name: build_manpath
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$MANPATH'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$MANPATH'))}
                      arms: [
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'> <Id.Lit_Other ':'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:PREPEND_MANPATH)
                                  op: assign_op.Equal
                                  rhs: {(${ Id.VSub_Name MANPATH)}
                                  spids: [337]
                                )
                              ]
                            )
                          ]
                          spids: [333 335 342 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Other ':'> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:APPEND_MANPATH)
                                  op: assign_op.Equal
                                  rhs: {(${ Id.VSub_Name MANPATH)}
                                  spids: [349]
                                )
                              ]
                            )
                          ]
                          spids: [345 347 354 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> <Id.Lit_Other ':'> <Id.Lit_Other ':'> <Id.Lit_Star '*'>}
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:PREPEND_MANPATH)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name MANPATH>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_DPercent
                                            arg_word: {<'::*'>}
                                          )
                                      )
                                    }
                                  spids: [364]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:APPEND_MANPATH)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name MANPATH>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Pound
                                            arg_word: {<'*::'>}
                                          )
                                      )
                                    }
                                  spids: [372]
                                )
                              ]
                            )
                          ]
                          spids: [357 361 380 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                          spids: [383 384 388 -1]
                        )
                      ]
                    )
                  ]
                  spids: [308 321]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} 
                          {(DQ ($ Id.VSub_DollarName '$PREPEND_MANPATH'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:IFS)
                          op: assign_op.Equal
                          rhs: {<Id.Lit_Other ':'>}
                          spids: [414]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: path
                      iter_words: [{($ Id.VSub_DollarName '$PREPEND_MANPATH')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [(C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$path'))})]
                        )
                    )
                    (C {<unset>} {<IFS>})
                  ]
                  spids: [398 411]
                )
              ]
            )
            (C {<search_path>})
            (C {<decho>} {(DQ <'Adding default manpath entries'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Other ':'>}
                  spids: [460]
                )
              ]
            )
            (command.ForEach
              iter_name: path
              iter_words: [{($ Id.VSub_DollarName '$man_default_path')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [(C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$path'))})]
                )
            )
            (C {<unset>} {<IFS>})
            (C {<parse_configs>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$APPEND_MANPATH'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:IFS)
                          op: assign_op.Equal
                          rhs: {<Id.Lit_Other ':'>}
                          spids: [512]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: path
                      iter_words: [{($ Id.VSub_DollarName '$APPEND_MANPATH')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [(C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$path'))})]
                        )
                    )
                    (C {<unset>} {<IFS>})
                  ]
                  spids: [496 509]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MANPATH)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name manpath>
                        suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<':'>})
                      )
                    }
                  spids: [550]
                )
              ]
            )
            (C {<decho>} {(DQ <'Using manual path: '> ($ Id.VSub_DollarName '$MANPATH'))})
          ]
        )
    )
    (command.ShFunction
      name: check_cat
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<exists>} {(DQ ($ Id.VSub_Number '$1'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:use_cat)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [594]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:catpage)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$found')}
                          spids: [598]
                        )
                      ]
                    )
                    (C {<setup_cattool>} {($ Id.VSub_DollarName '$catpage')})
                    (C {<decho>} {(DQ <'    Found catpage '> ($ Id.VSub_DollarName '$catpage'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [582 591]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_man
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<exists>} {(DQ ($ Id.VSub_Number '$1'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:manpage)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$found')}
                          spids: [665]
                        )
                      ]
                    )
                    (C {<setup_cattool>} {($ Id.VSub_DollarName '$manpage')})
                    (C {<decho>} {(DQ <'    Found manpage '> ($ Id.VSub_DollarName '$manpage'))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name use_width))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<unset>} {<use_cat>})
                            (C {<decho>} {(DQ <'    Skipping catpage: non-standard page width'>)})
                          ]
                          spids: [683 698]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DAmp]
                                  children: [
                                    (C {<exists>} {(DQ ($ Id.VSub_Number '$2'))})
                                    (C {<is_newer>} {($ Id.VSub_DollarName '$found')} 
                                      {($ Id.VSub_DollarName '$manpage')}
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:use_cat)
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                  spids: [741]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:catpage)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$found')}
                                  spids: [745]
                                )
                              ]
                            )
                            (C {<setup_cattool>} {($ Id.VSub_DollarName '$catpage')})
                            (C {<decho>} {(DQ <'    Using catpage '> ($ Id.VSub_DollarName '$catpage'))})
                          ]
                          spids: [717 734]
                        )
                      ]
                      else_action: [
                        (C {<unset>} {<use_cat>})
                        (C {<decho>} {(DQ <'    Skipping catpage: not found or old'>)})
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [649 658]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: decho
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$debug')} {<-ge>} 
                          {
                            (braced_var_sub
                              token: <Id.VSub_Number 2>
                              suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<1>})
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'-- '> ($ Id.VSub_Number '$1'))}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                  ]
                  spids: [813 830]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: exists
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>})
            (C {<unset>} {<IFS>})
            (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <f>})
            (C {<Id.KW_Set set>} {<-->} {(DQ ($ Id.VSub_Number '$1'))} {($ Id.VSub_Number '$1')})
            (C {<Id.KW_Set set>} {<-f>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number '$2'))} {<-a>} {<-r>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:found)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$2'))}
                          spids: [938]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [909 935]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: find_file
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<manroot>} {<catroot>} {<mann>} {<man0>} {<catn>} {<cat0>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:manroot)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1') </man> ($ Id.VSub_Number '$2'))}
                  spids: [992]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:catroot)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1') </cat> ($ Id.VSub_Number '$2'))}
                  spids: [1000]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_Number '$3'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:manroot)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$manroot') </> ($ Id.VSub_Number '$3'))}
                          spids: [1024]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:catroot)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$catroot') </> ($ Id.VSub_Number '$3'))}
                          spids: [1032]
                        )
                      ]
                    )
                  ]
                  spids: [1008 1021]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                          {(DQ ($ Id.VSub_DollarName '$manroot'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [1044 1059]
                )
              ]
            )
            (C {<decho>} {(DQ <'  Searching directory '> ($ Id.VSub_DollarName '$manroot'))} {<2>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:mann)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$manroot') </> ($ Id.VSub_Number '$4') <.> 
                        ($ Id.VSub_Number '$2') <'*'>
                      )
                    }
                  spids: [1081]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:man0)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$manroot') </> ($ Id.VSub_Number '$4') <'.0*'>)}
                  spids: [1092]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:catn)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$catroot') </> ($ Id.VSub_Number '$4') <.> 
                        ($ Id.VSub_Number '$2') <'*'>
                      )
                    }
                  spids: [1101]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cat0)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$catroot') </> ($ Id.VSub_Number '$4') <'.0*'>)}
                  spids: [1112]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<check_man>} {(DQ ($ Id.VSub_DollarName '$mann'))} 
                          {(DQ ($ Id.VSub_DollarName '$catn'))}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1130 1143]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<check_man>} {(DQ ($ Id.VSub_DollarName '$man0'))} 
                          {(DQ ($ Id.VSub_DollarName '$cat0'))}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1151 1164]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<check_cat>} {(DQ ($ Id.VSub_DollarName '$catn'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1172 1181]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {<check_cat>} {(DQ ($ Id.VSub_DollarName '$cat0'))})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1189 1198]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: is_newer
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} {<-ot>} 
                              {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<decho>} 
                      {
                        (DQ <'    mtime: '> ($ Id.VSub_Number '$1') <' not older than '> 
                          ($ Id.VSub_Number '$2')
                        )
                      } {<3>}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1230 1249]
                )
              ]
              else_action: [
                (C {<decho>} 
                  {
                    (DQ <'    mtime: '> ($ Id.VSub_Number '$1') <' older than '> ($ Id.VSub_Number '$2'))
                  } {<3>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: manpath_parse_args
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<cmd_arg>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<getopts>} {(SQ <Ldq>)} {<cmd_arg>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ (${ Id.VSub_Name cmd_arg))}
                      arms: [
                        (case_arm
                          pat_list: [{<L>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:Lflag)
                                  op: assign_op.Equal
                                  rhs: {<Lflag>}
                                  spids: [1341]
                                )
                              ]
                            )
                          ]
                          spids: [1338 1339 1344 -1]
                        )
                        (case_arm
                          pat_list: [{<d>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:debug)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$debug')}
                                              )
                                            right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                          )
                                      )
                                    }
                                  spids: [1350]
                                )
                              ]
                            )
                          ]
                          spids: [1347 1348 1362 -1]
                        )
                        (case_arm
                          pat_list: [{<q>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:qflag)
                                  op: assign_op.Equal
                                  rhs: {<qflag>}
                                  spids: [1368]
                                )
                              ]
                            )
                          ]
                          spids: [1365 1366 1371 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<manpath_usage>})]
                          spids: [1374 1375 1379 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: manpath_usage
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(SQ <'usage: manpath [-Ldq]'>)}]
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: manpath_warnings
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$Lflag'))} {<-a>} 
                          {<-n>} {(DQ ($ Id.VSub_DollarName '$MANLOCALES'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'(Warning: MANLOCALES environment variable set)'>)}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                  ]
                  spids: [1436 1457]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_check_for_so
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<line>} {<tstr>})
            (C {<unset>} {<IFS>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(C {<true>})]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:line)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {($ Id.VSub_DollarName '$cattool')} 
                                            {($ Id.VSub_DollarName '$manpage')}
                                          )
                                          (C {<head>} {<-1>})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [1522]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$line'))}
                      arms: [
                        (case_arm
                          pat_list: [{<.so> <Id.Lit_Star '*'>}]
                          action: [
                            (C {<trim>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name line>
                                    suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{<.so>})
                                  )
                                )
                              }
                            )
                            (C {<decho>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$manpage') <' includes '> 
                                  ($ Id.VSub_DollarName '$tstr')
                                )
                              }
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<check_man>} 
                                              {
                                                (DQ ($ Id.VSub_DollarName '$path') </> 
                                                  ($ Id.VSub_DollarName '$tstr') <'*'>
                                                )
                                              } {(DQ )}
                                            )
                                          ]
                                          negated: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<decho>} 
                                      {(DQ <'  Unable to find '> ($ Id.VSub_DollarName '$tstr'))}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [1573 1590]
                                )
                              ]
                            )
                          ]
                          spids: [1545 1547 1609 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                          spids: [1612 1613 1617 -1]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: man_display_page
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<pipeline>} {<testline>})
            (C {<unset>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$tflag'))} {<-a>} 
                          {<-n>} {(DQ ($ Id.VSub_DollarName '$use_cat'))} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$wflag'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$catpage') <' (source: '> 
                                  ($ Id.VSub_DollarName '$manpage') <')'>
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ret)
                                  op: assign_op.Equal
                                  rhs: {<0>}
                                  spids: [1729]
                                )
                              ]
                            )
                          ]
                          spids: [1703 1716]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$debug')} {<-gt>} 
                                      {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (C {<decho>} 
                                  {
                                    (DQ <'Command: '> ($ Id.VSub_DollarName '$cattool') <' '> 
                                      ($ Id.VSub_DollarName '$catpage') <' | '> ($ Id.VSub_DollarName '$MANPAGER')
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:ret)
                                      op: assign_op.Equal
                                      rhs: {<0>}
                                      spids: [1764]
                                    )
                                  ]
                                )
                              ]
                              spids: [1736 1749]
                            )
                          ]
                          else_action: [
                            (C {<eval>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$cattool') <' '> 
                                  ($ Id.VSub_DollarName '$catpage') <' | '> ($ Id.VSub_DollarName '$MANPAGER')
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ret)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_QMark '$?')}
                                  spids: [1782]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [1679 1700]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$wflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$manpage'))})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ret)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [1830]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [1807 1820]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$use_width'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:mandoc_args)
                          op: assign_op.Equal
                          rhs: {(DQ <'-O width='> (${ Id.VSub_Name use_width))}
                          spids: [1857]
                        )
                      ]
                    )
                  ]
                  spids: [1841 1854]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:testline)
                  op: assign_op.Equal
                  rhs: {(DQ <'mandoc -Tlint -Wunsupp >/dev/null 2>&1'>)}
                  spids: [1869]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$tflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:pipeline)
                          op: assign_op.Equal
                          rhs: {(DQ <'mandoc -Tps '> ($ Id.VSub_DollarName '$mandoc_args'))}
                          spids: [1891]
                        )
                      ]
                    )
                  ]
                  spids: [1875 1888]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:pipeline)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ <'mandoc '> ($ Id.VSub_DollarName '$mandoc_args') <' | '> 
                            ($ Id.VSub_DollarName '$MANPAGER')
                          )
                        }
                      spids: [1901]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<eval>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$cattool') <' '> 
                                  ($ Id.VSub_DollarName '$manpage') <' | '> ($ Id.VSub_DollarName '$testline')
                                )
                              }
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: (C {<which>} {<-s>} {<groff>})
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<man_display_page_groff>})]
                          spids: [1932 1941]
                        )
                      ]
                      else_action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'This manpage needs groff(1) to be rendered'>)}]
                          redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                        )
                        (command.Simple
                          words: [{<echo>} {(DQ <'First install groff(1): '>)}]
                          redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                        )
                        (command.Simple
                          words: [{<echo>} {(DQ <'pkg install groff '>)}]
                          redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:ret)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [1980]
                            )
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [1914 1929]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$debug')} {<-gt>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<decho>} 
                      {
                        (DQ <'Command: '> ($ Id.VSub_DollarName '$cattool') <' '> 
                          ($ Id.VSub_DollarName '$manpage') <' | '> ($ Id.VSub_DollarName '$pipeline')
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ret)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [2022]
                        )
                      ]
                    )
                  ]
                  spids: [1994 2007]
                )
              ]
              else_action: [
                (C {<eval>} 
                  {
                    (DQ ($ Id.VSub_DollarName '$cattool') <' '> ($ Id.VSub_DollarName '$manpage') 
                      <' | '> ($ Id.VSub_DollarName '$pipeline')
                    )
                  }
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ret)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '$?')}
                      spids: [2040]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_display_page_groff
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<EQN>} {<NROFF>} {<PIC>} {<TBL>} {<TROFF>} {<REFER>} {<VGRIND>})
            (C {<local>} {<IFS>} {<l>} {<nroff_dev>} {<pipeline>} {<preproc_arg>} {<tool>})
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name manpage))}
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_Star '*'> <.> (${ Id.VSub_Name man_charset) </> <Id.Lit_Star '*'>}
                  ]
                  action: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$man_charset'))}
                      arms: [
                        (case_arm
                          pat_list: [{<KOI8-R>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nroff_dev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <koi8-r>)}
                                  spids: [2157]
                                )
                              ]
                            )
                          ]
                          spids: [2154 2155 2162 -1]
                        )
                        (case_arm
                          pat_list: [{<ISO8859-1>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nroff_dev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <latin1>)}
                                  spids: [2168]
                                )
                              ]
                            )
                          ]
                          spids: [2165 2166 2173 -1]
                        )
                        (case_arm
                          pat_list: [{<ISO8859-15>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nroff_dev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <latin1>)}
                                  spids: [2179]
                                )
                              ]
                            )
                          ]
                          spids: [2176 2177 2184 -1]
                        )
                        (case_arm
                          pat_list: [{<UTF-8>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nroff_dev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <utf8>)}
                                  spids: [2190]
                                )
                              ]
                            )
                          ]
                          spids: [2187 2188 2195 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:nroff_dev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <ascii>)}
                                  spids: [2201]
                                )
                              ]
                            )
                          ]
                          spids: [2198 2199 2206 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NROFF)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$NROFF') <' -T'> 
                                ($ Id.VSub_DollarName '$nroff_dev')
                              )
                            }
                          spids: [2213]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:EQN)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$EQN') <' -T'> 
                                ($ Id.VSub_DollarName '$nroff_dev')
                              )
                            }
                          spids: [2221]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ (${ Id.VSub_Name manpage))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> </> (${ Id.VSub_Name man_lang) <_> 
                              (${ Id.VSub_Name man_country) <.> (${ Id.VSub_Name man_charset) </> <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:NROFF)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$NROFF') <' -dlocale='> 
                                        ($ Id.VSub_DollarName '$man_lang') <.> ($ Id.VSub_DollarName '$man_charset')
                                      )
                                    }
                                  spids: [2267]
                                )
                              ]
                            )
                          ]
                          spids: [2249 2264 2277 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> </> (${ Id.VSub_Name man_lang) <.> 
                              (${ Id.VSub_Name man_charset) </> <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:NROFF)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$NROFF') <' -dlocale='> 
                                        ($ Id.VSub_DollarName '$man_lang') <.> ($ Id.VSub_DollarName '$man_charset')
                                      )
                                    }
                                  spids: [2294]
                                )
                              ]
                            )
                          ]
                          spids: [2280 2291 2304 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:l)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {($ Id.VSub_DollarName '$man_lang')})
                                          (C {<tr>} 
                                            {<Id.Lit_LBracket '['> <Id.Lit_Other ':'> <lower> 
                                              <Id.Lit_Other ':'> <Id.Lit_RBracket ']'>
                                            } {<Id.Lit_LBracket '['> <Id.Lit_Other ':'> <upper> <Id.Lit_Other ':'> <Id.Lit_RBracket ']'>}
                                          )
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2319]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: tool
                      iter_words: [{<EQN>} {<NROFF>} {<PIC>} {<TBL>} {<TROFF>} {<REFER>} {<VGRIND>}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (C {<eval>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$tool') <'='> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\$'>
                                  ) <'{'> (${ Id.VSub_Name tool) <_> ($ Id.VSub_DollarName '$l') <':-'> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\$'>
                                  ) ($ Id.VSub_DollarName '$tool') <'}'>
                                )
                              }
                            )
                          ]
                        )
                    )
                  ]
                  spids: [2127 2134 2389 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NROFF)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$NROFF') <' -Tascii'>)}
                          spids: [2395]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:EQN)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$EQN') <' -Tascii'>)}
                          spids: [2402]
                        )
                      ]
                    )
                  ]
                  spids: [2392 2393 2409 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$MANCOLOR'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NROFF)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$NROFF') <' -P-c'>)}
                          spids: [2432]
                        )
                      ]
                    )
                  ]
                  spids: [2416 2429]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name use_width))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NROFF)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$NROFF') <' -rLL='> 
                                (${ Id.VSub_Name use_width) <'n -rLT='> (${ Id.VSub_Name use_width) <n>
                              )
                            }
                          spids: [2461]
                        )
                      ]
                    )
                  ]
                  spids: [2443 2458]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$MANROFFSEQ'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<Id.KW_Set set>} {<-->} {<-> ($ Id.VSub_DollarName '$MANROFFSEQ')})
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: [
                        (command.Sentence
                          child: (C {<getopts>} {(SQ <egprtv>)} {<preproc_arg>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Case
                              to_match: {(DQ (${ Id.VSub_Name preproc_arg))}
                              arms: [
                                (case_arm
                                  pat_list: [{<e>}]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:pipeline)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                                ($ Id.VSub_DollarName '$EQN')
                                              )
                                            }
                                          spids: [2532]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [2529 2530 2539 -1]
                                )
                                (case_arm
                                  pat_list: [{<g>}]
                                  spids: [2542 2543 2545 -1]
                                )
                                (case_arm
                                  pat_list: [{<p>}]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:pipeline)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                                ($ Id.VSub_DollarName '$PIC')
                                              )
                                            }
                                          spids: [2554]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [2551 2552 2561 -1]
                                )
                                (case_arm
                                  pat_list: [{<r>}]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:pipeline)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                                ($ Id.VSub_DollarName '$REFER')
                                              )
                                            }
                                          spids: [2567]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [2564 2565 2574 -1]
                                )
                                (case_arm
                                  pat_list: [{<t>}]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:pipeline)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                                ($ Id.VSub_DollarName '$TBL')
                                              )
                                            }
                                          spids: [2580]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [2577 2578 2587 -1]
                                )
                                (case_arm
                                  pat_list: [{<v>}]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:pipeline)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                                ($ Id.VSub_DollarName '$VGRIND')
                                              )
                                            }
                                          spids: [2593]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [2590 2591 2600 -1]
                                )
                                (case_arm
                                  pat_list: [{<Id.Lit_Star '*'>}]
                                  action: [(C {<usage>})]
                                  spids: [2603 2604 2608 -1]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:pipeline)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <Id.VSub_Name pipeline>
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op_id: Id.VOp1_Pound
                                      arg_word: {(DQ <' | '>)}
                                    )
                                )
                              )
                            }
                          spids: [2621]
                        )
                      ]
                    )
                  ]
                  spids: [2480 2493]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:pipeline)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName '$TBL'))}
                      spids: [2636]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$tflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:pipeline)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                                ($ Id.VSub_DollarName '$TROFF')
                              )
                            }
                          spids: [2662]
                        )
                      ]
                    )
                  ]
                  spids: [2646 2659]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:pipeline)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ ($ Id.VSub_DollarName '$pipeline') <' | '> 
                            ($ Id.VSub_DollarName '$NROFF') <' | '> ($ Id.VSub_DollarName '$MANPAGER')
                          )
                        }
                      spids: [2673]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$debug')} {<-gt>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<decho>} 
                      {
                        (DQ <'Command: '> ($ Id.VSub_DollarName '$cattool') <' '> 
                          ($ Id.VSub_DollarName '$manpage') <' | '> ($ Id.VSub_DollarName '$pipeline')
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ret)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [2715]
                        )
                      ]
                    )
                  ]
                  spids: [2687 2700]
                )
              ]
              else_action: [
                (C {<eval>} 
                  {
                    (DQ ($ Id.VSub_DollarName '$cattool') <' '> ($ Id.VSub_DollarName '$manpage') 
                      <' | '> ($ Id.VSub_DollarName '$pipeline')
                    )
                  }
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ret)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '$?')}
                      spids: [2733]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_find_and_display
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<found_page>} {<locpath>} {<p>} {<path>} {<sect>})
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> </> <Id.Lit_Star '*'>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_Number '$1'))} {<-a>} 
                                  {<-r>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<decho>} {(DQ <'Found a usable page, displaying that'>)})
                            (C {<unset>} {<use_cat>})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:manpage)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                                  spids: [2827]
                                )
                              ]
                            )
                            (C {<setup_cattool>} {($ Id.VSub_DollarName '$manpage')})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<man_check_for_so>} {($ Id.VSub_DollarName '$manpage')} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_DollarParen '$('>
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {<dirname>} {($ Id.VSub_DollarName '$manpage')})
                                                  ]
                                                )
                                            )
                                          }
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:found_page)
                                          op: assign_op.Equal
                                          rhs: {<yes>}
                                          spids: [2854]
                                        )
                                      ]
                                    )
                                    (C {<man_display_page>})
                                  ]
                                  spids: [2838 2851]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                            )
                          ]
                          spids: [2791 2812]
                        )
                      ]
                    )
                  ]
                  spids: [2786 2789 2870 -1]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Other ':'>}
                  spids: [2877]
                )
              ]
            )
            (command.ForEach
              iter_name: sect
              iter_words: [{($ Id.VSub_DollarName '$MANSECT')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<decho>} {(DQ <'Searching section '> ($ Id.VSub_DollarName '$sect'))} {<2>})
                    (command.ForEach
                      iter_name: path
                      iter_words: [{($ Id.VSub_DollarName '$MANPATH')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ForEach
                              iter_name: locpath
                              iter_words: [{($ Id.VSub_DollarName '$locpaths')}]
                              do_arg_iter: F
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:p)
                                          op: assign_op.Equal
                                          rhs: 
                                            {($ Id.VSub_DollarName '$path') </> 
                                              ($ Id.VSub_DollarName '$locpath')
                                            }
                                          spids: [2927]
                                        )
                                      ]
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:p)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (braced_var_sub
                                                token: <Id.VSub_Name p>
                                                suffix_op: 
                                                  (suffix_op.Unary
                                                    op_id: Id.VOp1_Percent
                                                    arg_word: {<Id.Lit_Slash /> <.>}
                                                  )
                                              )
                                            }
                                          spids: [2933]
                                        )
                                      ]
                                    )
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (command.Sentence
                                              child: 
                                                (C {<find_file>} {($ Id.VSub_DollarName '$p')} 
                                                  {($ Id.VSub_DollarName '$sect')} {($ Id.VSub_DollarName '$MACHINE')} {(DQ ($ Id.VSub_Number '$1'))}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                          action: [
                                            (command.If
                                              arms: [
                                                (if_arm
                                                  cond: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<man_check_for_so>} 
                                                          {($ Id.VSub_DollarName '$manpage')} {($ Id.VSub_DollarName '$p')}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                  action: [
                                                    (command.ShAssignment
                                                      pairs: [
                                                        (assign_pair
                                                          lhs: (sh_lhs_expr.Name name:found_page)
                                                          op: assign_op.Equal
                                                          rhs: {<yes>}
                                                          spids: [2980]
                                                        )
                                                      ]
                                                    )
                                                    (C {<man_display_page>})
                                                    (command.If
                                                      arms: [
                                                        (if_arm
                                                          cond: [
                                                            (command.Sentence
                                                              child: 
                                                                (C {<Id.Lit_LBracket '['>} {<-n>} 
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName '$aflag')
                                                                    )
                                                                  } {<Id.Lit_RBracket ']'>}
                                                                )
                                                              terminator: <Id.Op_Semi _>
                                                            )
                                                          ]
                                                          action: [
                                                            (command.ControlFlow
                                                              token: 
                                                                <Id.ControlFlow_Continue continue>
                                                              arg_word: {<2>}
                                                            )
                                                          ]
                                                          spids: [2987 3000]
                                                        )
                                                      ]
                                                      else_action: [
                                                        (command.ControlFlow
                                                          token: <Id.ControlFlow_Return return>
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  spids: [2968 2977]
                                                )
                                              ]
                                            )
                                          ]
                                          spids: [2950 2965]
                                        )
                                      ]
                                    )
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (command.Sentence
                                              child: 
                                                (C {<find_file>} {($ Id.VSub_DollarName '$p')} 
                                                  {($ Id.VSub_DollarName '$sect')} {($ Id.VSub_DollarName '$MACHINE_ARCH')} {(DQ ($ Id.VSub_Number '$1'))}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                          action: [
                                            (command.If
                                              arms: [
                                                (if_arm
                                                  cond: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<man_check_for_so>} 
                                                          {($ Id.VSub_DollarName '$manpage')} {($ Id.VSub_DollarName '$p')}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                  action: [
                                                    (command.ShAssignment
                                                      pairs: [
                                                        (assign_pair
                                                          lhs: (sh_lhs_expr.Name name:found_page)
                                                          op: assign_op.Equal
                                                          rhs: {<yes>}
                                                          spids: [3062]
                                                        )
                                                      ]
                                                    )
                                                    (C {<man_display_page>})
                                                    (command.If
                                                      arms: [
                                                        (if_arm
                                                          cond: [
                                                            (command.Sentence
                                                              child: 
                                                                (C {<Id.Lit_LBracket '['>} {<-n>} 
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName '$aflag')
                                                                    )
                                                                  } {<Id.Lit_RBracket ']'>}
                                                                )
                                                              terminator: <Id.Op_Semi _>
                                                            )
                                                          ]
                                                          action: [
                                                            (command.ControlFlow
                                                              token: 
                                                                <Id.ControlFlow_Continue continue>
                                                              arg_word: {<2>}
                                                            )
                                                          ]
                                                          spids: [3069 3082]
                                                        )
                                                      ]
                                                      else_action: [
                                                        (command.ControlFlow
                                                          token: <Id.ControlFlow_Return return>
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  spids: [3050 3059]
                                                )
                                              ]
                                            )
                                          ]
                                          spids: [3032 3047]
                                        )
                                      ]
                                    )
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (command.Sentence
                                              child: 
                                                (C {<find_file>} {($ Id.VSub_DollarName '$p')} 
                                                  {($ Id.VSub_DollarName '$sect')} {(SQ )} {(DQ ($ Id.VSub_Number '$1'))}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                          action: [
                                            (command.If
                                              arms: [
                                                (if_arm
                                                  cond: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<man_check_for_so>} 
                                                          {($ Id.VSub_DollarName '$manpage')} {($ Id.VSub_DollarName '$p')}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                  action: [
                                                    (command.ShAssignment
                                                      pairs: [
                                                        (assign_pair
                                                          lhs: (sh_lhs_expr.Name name:found_page)
                                                          op: assign_op.Equal
                                                          rhs: {<yes>}
                                                          spids: [3141]
                                                        )
                                                      ]
                                                    )
                                                    (C {<man_display_page>})
                                                    (command.If
                                                      arms: [
                                                        (if_arm
                                                          cond: [
                                                            (command.Sentence
                                                              child: 
                                                                (C {<Id.Lit_LBracket '['>} {<-n>} 
                                                                  {
                                                                    (DQ 
                                                                      ($ Id.VSub_DollarName '$aflag')
                                                                    )
                                                                  } {<Id.Lit_RBracket ']'>}
                                                                )
                                                              terminator: <Id.Op_Semi _>
                                                            )
                                                          ]
                                                          action: [
                                                            (command.ControlFlow
                                                              token: 
                                                                <Id.ControlFlow_Continue continue>
                                                              arg_word: {<2>}
                                                            )
                                                          ]
                                                          spids: [3148 3161]
                                                        )
                                                      ]
                                                      else_action: [
                                                        (command.ControlFlow
                                                          token: <Id.ControlFlow_Return return>
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  spids: [3129 3138]
                                                )
                                              ]
                                            )
                                          ]
                                          spids: [3110 3126]
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          ]
                        )
                    )
                  ]
                )
            )
            (C {<unset>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$found_page'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'No manual entry for '> ($ Id.VSub_Number '$1'))}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ret)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [3230]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [3203 3216]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_parse_args
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<cmd_arg>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<getopts>} {(SQ <'M:P:S:adfhkm:op:tw'>)} {<cmd_arg>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ (${ Id.VSub_Name cmd_arg))}
                      arms: [
                        (case_arm
                          pat_list: [{<M>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANPATH)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$OPTARG')}
                                  spids: [3291]
                                )
                              ]
                            )
                          ]
                          spids: [3288 3289 3294 -1]
                        )
                        (case_arm
                          pat_list: [{<P>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANPAGER)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$OPTARG')}
                                  spids: [3300]
                                )
                              ]
                            )
                          ]
                          spids: [3297 3298 3303 -1]
                        )
                        (case_arm
                          pat_list: [{<S>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANSECT)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$OPTARG')}
                                  spids: [3309]
                                )
                              ]
                            )
                          ]
                          spids: [3306 3307 3312 -1]
                        )
                        (case_arm
                          pat_list: [{<a>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:aflag)
                                  op: assign_op.Equal
                                  rhs: {<aflag>}
                                  spids: [3318]
                                )
                              ]
                            )
                          ]
                          spids: [3315 3316 3321 -1]
                        )
                        (case_arm
                          pat_list: [{<d>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:debug)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$debug')}
                                              )
                                            right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                          )
                                      )
                                    }
                                  spids: [3327]
                                )
                              ]
                            )
                          ]
                          spids: [3324 3325 3339 -1]
                        )
                        (case_arm
                          pat_list: [{<f>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:fflag)
                                  op: assign_op.Equal
                                  rhs: {<fflag>}
                                  spids: [3345]
                                )
                              ]
                            )
                          ]
                          spids: [3342 3343 3348 -1]
                        )
                        (case_arm
                          pat_list: [{<h>}]
                          action: [(C {<man_usage>} {<0>})]
                          spids: [3351 3352 3358 -1]
                        )
                        (case_arm
                          pat_list: [{<k>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:kflag)
                                  op: assign_op.Equal
                                  rhs: {<kflag>}
                                  spids: [3364]
                                )
                              ]
                            )
                          ]
                          spids: [3361 3362 3367 -1]
                        )
                        (case_arm
                          pat_list: [{<m>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:mflag)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$OPTARG')}
                                  spids: [3373]
                                )
                              ]
                            )
                          ]
                          spids: [3370 3371 3376 -1]
                        )
                        (case_arm
                          pat_list: [{<o>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:oflag)
                                  op: assign_op.Equal
                                  rhs: {<oflag>}
                                  spids: [3382]
                                )
                              ]
                            )
                          ]
                          spids: [3379 3380 3385 -1]
                        )
                        (case_arm
                          pat_list: [{<p>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANROFFSEQ)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$OPTARG')}
                                  spids: [3391]
                                )
                              ]
                            )
                          ]
                          spids: [3388 3389 3394 -1]
                        )
                        (case_arm
                          pat_list: [{<t>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:tflag)
                                  op: assign_op.Equal
                                  rhs: {<tflag>}
                                  spids: [3400]
                                )
                              ]
                            )
                          ]
                          spids: [3397 3398 3403 -1]
                        )
                        (case_arm
                          pat_list: [{<w>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:wflag)
                                  op: assign_op.Equal
                                  rhs: {<wflag>}
                                  spids: [3409]
                                )
                              ]
                            )
                          ]
                          spids: [3406 3407 3412 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<man_usage>})]
                          spids: [3415 3416 3420 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
            (C {<shift>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Minus
                      left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$OPTIND')})
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                    )
                )
              }
            )
            (command.Case
              to_match: 
                {
                  (DQ (${ Id.VSub_Name fflag) (${ Id.VSub_Name kflag) (${ Id.VSub_Name tflag) 
                    (${ Id.VSub_Name wflag)
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{<fflagkflag> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -f and -k'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3472 3474 3485 -1]
                )
                (case_arm
                  pat_list: [{<fflag> <Id.Lit_Star '*'> <tflag> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -f and -t'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3488 3492 3503 -1]
                )
                (case_arm
                  pat_list: [{<fflag> <Id.Lit_Star '*'> <wflag>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -f and -w'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3506 3509 3520 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <kflagtflag> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -k and -t'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3523 3526 3537 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <kflag> <Id.Lit_Star '*'> <wflag>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -k and -w'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3540 3544 3555 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <tflagwflag>}]
                  action: [
                    (command.Sentence
                      child: (C {<echo>} {(DQ <'Incompatible options: -t and -w'>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<man_usage>})
                  ]
                  spids: [3558 3560 3571 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$fflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<do_whatis>} {(DQ ($ Id.VSub_At '$@'))})
                    (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
                  ]
                  spids: [3582 3595]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$kflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<do_apropos>} {(DQ ($ Id.VSub_At '$@'))})
                    (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
                  ]
                  spids: [3612 3625]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Other ':'>}
                  spids: [3642]
                )
              ]
            )
            (command.ForEach
              iter_name: sect
              iter_words: [{($ Id.VSub_DollarName '$man_default_sections')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$sect'))} 
                                  {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<decho>} 
                              {
                                (DQ <'Detected manual section as first arg: '> ($ Id.VSub_Number '$1'))
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANSECT)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                                  spids: [3686]
                                )
                              ]
                            )
                            (C {<shift>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [3658 3675]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<unset>} {<IFS>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pages)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Star '$*'))}
                  spids: [3710]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_setup
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$mflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MACHINE_ARCH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name mflag>
                                suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPercent arg_word:{<':*'>})
                              )
                            }
                          spids: [3751]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MACHINE)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name mflag>
                                suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPound arg_word:{<'*:'>})
                              )
                            }
                          spids: [3759]
                        )
                      ]
                    )
                  ]
                  spids: [3735 3748]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$MACHINE_ARCH'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MACHINE_ARCH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {($ Id.VSub_DollarName '$SYSCTL')} {<-n>} {<hw.machine_arch>})
                                    ]
                                  )
                              )
                            }
                          spids: [3786]
                        )
                      ]
                    )
                  ]
                  spids: [3770 3783]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$MACHINE'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MACHINE)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {($ Id.VSub_DollarName '$SYSCTL')} {<-n>} {<hw.machine>})
                                    ]
                                  )
                              )
                            }
                          spids: [3815]
                        )
                      ]
                    )
                  ]
                  spids: [3799 3812]
                )
              ]
            )
            (C {<decho>} 
              {
                (DQ <'Using architecture: '> ($ Id.VSub_DollarName '$MACHINE_ARCH') <':'> 
                  ($ Id.VSub_DollarName '$MACHINE')
                )
              }
            )
            (C {<setup_pager>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$MANSECT'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:MANSECT)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$man_default_sections')}
                          spids: [3863]
                        )
                      ]
                    )
                  ]
                  spids: [3847 3860]
                )
              ]
            )
            (C {<decho>} {(DQ <'Using manual sections: '> ($ Id.VSub_DollarName '$MANSECT'))})
            (C {<build_manpath>})
            (C {<man_setup_locale>})
            (C {<man_setup_width>})
          ]
        )
    )
    (command.ShFunction
      name: man_setup_width
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<sizes>})
            (C {<unset>} {<use_width>})
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$MANWIDTH'))}
              arms: [
                (case_arm
                  pat_list: [{<Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [
                                    {<Id.Lit_LBracket '['>}
                                    {(DQ ($ Id.VSub_DollarName '$MANWIDTH'))}
                                    {<-gt>}
                                    {<0>}
                                    {<Id.Lit_RBracket ']'>}
                                  ]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_Great '2>'>
                                      fd: 2
                                      arg_word: {</dev/null>}
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:use_width)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$MANWIDTH')}
                                  spids: [3951]
                                )
                              ]
                            )
                          ]
                          spids: [3930 3948]
                        )
                      ]
                    )
                  ]
                  spids: [3923 3927 3958 -1]
                )
                (case_arm
                  pat_list: [
                    {<Id.Lit_LBracket '['> <Tt> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Tt> 
                      <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'>
                    }
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.BraceGroup
                                  children: [
                                    (command.Sentence
                                      child: 
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:sizes)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (command_sub
                                                    left_token: <Id.Left_DollarParen '$('>
                                                    command_list: 
                                                      (command.CommandList
                                                        children: [
                                                          (command.Simple
                                                            words: [
                                                              {($ Id.VSub_DollarName '$STTY')}
                                                              {<size>}
                                                            ]
                                                            redirects: [
                                                              (redir.Redir
                                                                op: <Id.Redir_GreatAnd '0>&'>
                                                                fd: 0
                                                                arg_word: {<3>}
                                                              )
                                                              (redir.Redir
                                                                op: <Id.Redir_Great '2>'>
                                                                fd: 2
                                                                arg_word: {</dev/null>}
                                                              )
                                                            ]
                                                          )
                                                        ]
                                                      )
                                                  )
                                                }
                                              spids: [3977]
                                            )
                                          ]
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  redirects: [
                                    (redir.Redir
                                      op: <Id.Redir_GreatAnd '3>&'>
                                      fd: 3
                                      arg_word: {<1>}
                                    )
                                  ]
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<Id.KW_Set set>} {<-->} {($ Id.VSub_DollarName '$sizes')})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Number '$2')} {<-gt>} 
                                          {<80>} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:use_width)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (word_part.ArithSub
                                                anode: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Minus
                                                    left: 
                                                      (arith_expr.ArithWord
                                                        w: {($ Id.VSub_Number '$2')}
                                                      )
                                                    right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>})
                                                  )
                                              )
                                            }
                                          spids: [4023]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [4007 4020]
                                )
                              ]
                            )
                          ]
                          spids: [3973 3997]
                        )
                      ]
                    )
                  ]
                  spids: [3961 3970 4038 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$use_width'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<decho>} {(DQ <'Using non-standard page width: '> (${ Id.VSub_Name use_width))})
                  ]
                  spids: [4044 4057]
                )
              ]
              else_action: [(C {<decho>} {(SQ <'Using standard page width'>)})]
            )
          ]
        )
    )
    (command.ShFunction
      name: man_setup_locale
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<lang_cc>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:locpaths)
                  op: assign_op.Equal
                  rhs: {(SQ <.>)}
                  spids: [4104]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:man_charset)
                  op: assign_op.Equal
                  rhs: {(SQ <US-ASCII>)}
                  spids: [4110]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$oflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<decho>} {(SQ <'Using non-localized manpages'>)})]
                  spids: [4121 4134]
                )
              ]
              else_action: [
                (C {<eval>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {($ Id.VSub_DollarName '$LOCALE')})]
                        )
                    )
                  }
                )
                (command.Case
                  to_match: {(DQ ($ Id.VSub_DollarName '$LC_CTYPE'))}
                  arms: [
                    (case_arm pat_list:[{<C>}] spids:[4170 4171 4173 -1])
                    (case_arm pat_list:[{<POSIX>}] spids:[4176 4177 4179 -1])
                    (case_arm
                      pat_list: [
                        {<Id.Lit_LBracket '['> <a-z> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <a-z> 
                          <Id.Lit_RBracket ']'> <Id.Lit_ArrayLhsOpen '_['> <A-Z> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <A-Z> <Id.Lit_RBracket ']'> 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\.'>
                          ) <Id.Lit_Star '*'>
                        }
                      ]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:lang_cc)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <Id.VSub_Name LC_CTYPE>
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VOp1_Percent
                                          arg_word: {<'.*'>}
                                        )
                                    )
                                  )
                                }
                              spids: [4199]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:man_lang)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <Id.VSub_Name LC_CTYPE>
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VOp1_Percent
                                          arg_word: {<'_*'>}
                                        )
                                    )
                                  )
                                }
                              spids: [4209]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:man_country)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <Id.VSub_Name lang_cc>
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VOp1_Pound
                                          arg_word: {<'*_'>}
                                        )
                                    )
                                  )
                                }
                              spids: [4219]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:man_charset)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <Id.VSub_Name LC_CTYPE>
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VOp1_Pound
                                          arg_word: {<'*.'>}
                                        )
                                    )
                                  )
                                }
                              spids: [4229]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:locpaths)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName '$LC_CTYPE'))}
                              spids: [4239]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:locpaths)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ ($ Id.VSub_DollarName '$locpaths') <':'> 
                                    ($ Id.VSub_DollarName '$man_lang') <.> ($ Id.VSub_DollarName '$man_charset')
                                  )
                                }
                              spids: [4245]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$man_lang'))} 
                                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <en>)} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:locpaths)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ ($ Id.VSub_DollarName '$locpaths') <':en.'> 
                                            ($ Id.VSub_DollarName '$man_charset')
                                          )
                                        }
                                      spids: [4276]
                                    )
                                  ]
                                )
                              ]
                              spids: [4255 4273]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:locpaths)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName '$locpaths') <':.'>)}
                              spids: [4287]
                            )
                          ]
                        )
                      ]
                      spids: [4182 4196 4294 -1]
                    )
                    (case_arm
                      pat_list: [{<Id.Lit_Star '*'>}]
                      action: [
                        (command.Simple
                          words: [{<echo>} {(SQ <'Unknown locale, assuming C'>)}]
                          redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                        )
                      ]
                      spids: [4297 4298 4310 -1]
                    )
                  ]
                )
              ]
            )
            (C {<decho>} {(DQ <'Using locale paths: '> ($ Id.VSub_DollarName '$locpaths'))})
          ]
        )
    )
    (command.ShFunction
      name: man_usage
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {(SQ <'Usage:'>)})
            (C {<echo>} {(SQ <' man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]'>)})
            (C {<echo>} {(SQ <'     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]'>)})
            (C {<echo>} {(SQ <' man -f page [...] -- Emulates whatis(1)'>)})
            (C {<echo>} {(SQ <' man -k page [...] -- Emulates apropos(1)'>)})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: 
                {
                  (braced_var_sub
                    token: <Id.VSub_Number 1>
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<1>})
                  )
                }
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_configs
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<file>} {<files>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$parsed_configs'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [4417 4430]
                )
              ]
            )
            (C {<unset>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-r>} {(DQ ($ Id.VSub_DollarName '$config_global'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<parse_file>} {(DQ ($ Id.VSub_DollarName '$config_global'))})]
                  spids: [4454 4467]
                )
              ]
            )
            (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <f>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:files)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {<echo>} {($ Id.VSub_DollarName '$config_local')})]
                          )
                      )
                    }
                  spids: [4491]
                )
              ]
            )
            (C {<Id.KW_Set set>} {<-f>})
            (command.ForEach
              iter_name: file
              iter_words: [{($ Id.VSub_DollarName '$files')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-r>} {(DQ ($ Id.VSub_DollarName '$file'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [(C {<parse_file>} {(DQ ($ Id.VSub_DollarName '$file'))})]
                          spids: [4517 4530]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:parsed_configs)
                  op: assign_op.Equal
                  rhs: {(SQ <yes>)}
                  spids: [4547]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: parse_file
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<file>} {<line>} {<tstr>} {<Id.KW_Var var>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [4580]
                )
              ]
            )
            (C {<decho>} {(DQ <'Parsing config file: '> ($ Id.VSub_DollarName '$file'))})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<read>} {<line>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (C {<decho>} {(DQ <'  '> ($ Id.VSub_DollarName '$line'))} {<2>})
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$line'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\#'>) 
                              <Id.Lit_Star '*'>
                            }
                          ]
                          action: [(C {<decho>} {(DQ <'    Comment'>)} {<3>})]
                          spids: [4623 4625 4636 -1]
                        )
                        (case_arm
                          pat_list: [{<MANPATH> <Id.Lit_Star '*'>}]
                          action: [
                            (C {<decho>} {(DQ <'    MANPATH'>)} {<3>})
                            (C {<trim>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name line>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op_id: Id.VOp1_Pound
                                        arg_word: {<MANPATH>}
                                      )
                                  )
                                )
                              }
                            )
                            (C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$tstr'))})
                          ]
                          spids: [4639 4641 4670 -1]
                        )
                        (case_arm
                          pat_list: [{<MANLOCALE> <Id.Lit_Star '*'>}]
                          action: [
                            (C {<decho>} {(DQ <'    MANLOCALE'>)} {<3>})
                            (C {<trim>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name line>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op_id: Id.VOp1_Pound
                                        arg_word: {<MANLOCALE>}
                                      )
                                  )
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:manlocales)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$manlocales') <':'> 
                                        ($ Id.VSub_DollarName '$tstr')
                                      )
                                    }
                                  spids: [4697]
                                )
                              ]
                            )
                          ]
                          spids: [4673 4675 4705 -1]
                        )
                        (case_arm
                          pat_list: [{<MANCONFIG> <Id.Lit_Star '*'>}]
                          action: [
                            (C {<decho>} {(DQ <'    MANCONFIG'>)} {<3>})
                            (C {<trim>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name line>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op_id: Id.VOp1_Pound
                                        arg_word: {<MANCONFIG>}
                                      )
                                  )
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:config_local)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$tstr'))}
                                  spids: [4732]
                                )
                              ]
                            )
                          ]
                          spids: [4708 4710 4738 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> <_> <Id.Lit_Star '*'> <Id.Lit_LBracket '['> 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\ '>
                              ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:var)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name line>
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_DPercent
                                              arg_word: 
                                                {<'['> 
                                                  (word_part.EscapedLiteral
                                                    token: <Id.Lit_EscapedChar '\\ '>
                                                  ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <']*'>
                                                }
                                            )
                                        )
                                      )
                                    }
                                  spids: [4755]
                                )
                              ]
                            )
                            (C {<trim>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name line>
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op_id: Id.VOp1_Pound
                                        arg_word: {($ Id.VSub_DollarName '$var')}
                                      )
                                  )
                                )
                              }
                            )
                            (C {<eval>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$var') <'='> 
                                  (word_part.EscapedLiteral
                                    token: <Id.Lit_EscapedChar '\\"'>
                                  ) ($ Id.VSub_DollarName '$tstr') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                )
                              }
                            )
                            (C {<decho>} {(DQ <'    Parsed '> ($ Id.VSub_DollarName '$var'))} {<3>})
                          ]
                          spids: [4745 4753 4800 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Less '<'>
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$file'))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: search_path
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<p>} {<path>})
            (C {<decho>} {(DQ <'Searching PATH for man directories'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Other ':'>}
                  spids: [4848]
                )
              ]
            )
            (command.ForEach
              iter_name: path
              iter_words: [{($ Id.VSub_DollarName '$PATH')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$path'))}
                      arms: [
                        (case_arm
                          pat_list: [{</bin>} {</usr/bin>}]
                          action: [(C {<add_to_manpath>} {(DQ </usr/share/man>)})]
                          spids: [4881 4884 4892 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<add_to_manpath>} 
                                          {(DQ ($ Id.VSub_DollarName '$path') </man>)}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [(C {<Id.Lit_Other ':'>})]
                                  spids: [4898 4908]
                                )
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<add_to_manpath>} 
                                          {(DQ ($ Id.VSub_DollarName '$path') </MAN>)}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [(C {<Id.Lit_Other ':'>})]
                                  spids: [4914 4924]
                                )
                              ]
                              else_action: [
                                (command.Case
                                  to_match: {(DQ ($ Id.VSub_DollarName '$path'))}
                                  arms: [
                                    (case_arm
                                      pat_list: [{<Id.Lit_Star '*'> </bin>}]
                                      action: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:p)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ 
                                                    (braced_var_sub
                                                      token: <Id.VSub_Name path>
                                                      suffix_op: 
                                                        (suffix_op.Unary
                                                          op_id: Id.VOp1_Percent
                                                          arg_word: {<Id.Lit_Slash /> <bin>}
                                                        )
                                                    ) </man>
                                                  )
                                                }
                                              spids: [4946]
                                            )
                                          ]
                                        )
                                        (C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$p'))})
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:p)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ 
                                                    (braced_var_sub
                                                      token: <Id.VSub_Name path>
                                                      suffix_op: 
                                                        (suffix_op.Unary
                                                          op_id: Id.VOp1_Percent
                                                          arg_word: {<Id.Lit_Slash /> <bin>}
                                                        )
                                                    ) </share/man>
                                                  )
                                                }
                                              spids: [4965]
                                            )
                                          ]
                                        )
                                        (C {<add_to_manpath>} {(DQ ($ Id.VSub_DollarName '$p'))})
                                      ]
                                      spids: [4942 4944 4984 -1]
                                    )
                                    (case_arm
                                      pat_list: [{<Id.Lit_Star '*'>}]
                                      spids: [4987 4988 4990 -1]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [4895 4896 4999 -1]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<unset>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$manpath'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<decho>} {(SQ <'  Unable to find any manpaths, using default'>)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:manpath)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$man_default_path')}
                          spids: [5037]
                        )
                      ]
                    )
                  ]
                  spids: [5014 5027]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: search_whatis
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<IFS>} {<bad>} {<cmd>} {<f>} {<good>} {<key>} {<keywords>} {<loc>} {<opt>} {<out>} 
              {<path>} {<rval>} {<wlist>}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmd)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [5089]
                )
              ]
            )
            (C {<shift>})
            (C {<whatis_parse_args>} {(DQ ($ Id.VSub_At '$@'))})
            (C {<build_manpath>})
            (C {<build_manlocales>})
            (C {<setup_pager>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$cmd'))} 
                          {<Id.Lit_Equals '='>} {(DQ <whatis>)} {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:opt)
                          op: assign_op.Equal
                          rhs: {(DQ <-w>)}
                          spids: [5137]
                        )
                      ]
                    )
                  ]
                  spids: [5117 5134]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:f)
                  op: assign_op.Equal
                  rhs: {(SQ <whatis>)}
                  spids: [5147]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Other ':'>}
                  spids: [5154]
                )
              ]
            )
            (command.ForEach
              iter_name: path
              iter_words: [{($ Id.VSub_DollarName '$MANPATH')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} 
                                  {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\!'>)} {<-d>} {(DQ ($ Id.VSub_DollarName '$path'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<decho>} 
                              {(DQ <'Skipping non-existent path: '> ($ Id.VSub_DollarName '$path'))} {<2>}
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [5170 5185]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {
                                    (DQ ($ Id.VSub_DollarName '$path') </> ($ Id.VSub_DollarName '$f'))
                                  } {<-a>} {<-r>} {(DQ ($ Id.VSub_DollarName '$path') </> ($ Id.VSub_DollarName '$f'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<decho>} 
                              {
                                (DQ <'Found whatis: '> ($ Id.VSub_DollarName '$path') </> 
                                  ($ Id.VSub_DollarName '$f')
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:wlist)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$wlist') <' '> 
                                        ($ Id.VSub_DollarName '$path') </> ($ Id.VSub_DollarName '$f')
                                      )
                                    }
                                  spids: [5243]
                                )
                              ]
                            )
                          ]
                          spids: [5205 5230]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: loc
                      iter_words: [{($ Id.VSub_DollarName '$MANLOCALES')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {
                                            (DQ ($ Id.VSub_DollarName '$path') </> 
                                              ($ Id.VSub_DollarName '$loc') </> ($ Id.VSub_DollarName '$f')
                                            )
                                          } {<-a>} {<-r>} 
                                          {
                                            (DQ ($ Id.VSub_DollarName '$path') </> 
                                              ($ Id.VSub_DollarName '$loc') </> ($ Id.VSub_DollarName '$f')
                                            )
                                          } {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<decho>} 
                                      {
                                        (DQ <'Found whatis: '> ($ Id.VSub_DollarName '$path') </> 
                                          ($ Id.VSub_DollarName '$loc') </> ($ Id.VSub_DollarName '$f')
                                        )
                                      }
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:wlist)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$wlist') <' '> 
                                                ($ Id.VSub_DollarName '$path') </> ($ Id.VSub_DollarName '$loc') </> ($ Id.VSub_DollarName '$f')
                                              )
                                            }
                                          spids: [5313]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [5269 5298]
                                )
                              ]
                            )
                          ]
                        )
                    )
                  ]
                )
            )
            (C {<unset>} {<IFS>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$wlist'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ ($ Id.VSub_DollarName '$cmd') <': no whatis databases in '> 
                            ($ Id.VSub_DollarName '$MANPATH')
                          )
                        }
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [5340 5353]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:rval)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [5377]
                )
              ]
            )
            (command.ForEach
              iter_name: key
              iter_words: [{($ Id.VSub_DollarName '$keywords')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:out)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {<grep>} {<-Ehi>} {($ Id.VSub_DollarName '$opt')} {<-->} 
                                        {(DQ ($ Id.VSub_DollarName '$key'))} {($ Id.VSub_DollarName '$wlist')}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [5393]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$out'))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:good)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$good') 
                                        (word_part.EscapedLiteral
                                          token: <Id.Lit_EscapedChar '\\\\'>
                                        ) <n> ($ Id.VSub_DollarName '$out')
                                      )
                                    }
                                  spids: [5427]
                                )
                              ]
                            )
                          ]
                          spids: [5411 5424]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:bad)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ ($ Id.VSub_DollarName '$bad') 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\\\'>
                                    ) <n> ($ Id.VSub_DollarName '$key') <': nothing appropriate'>
                                  )
                                }
                              spids: [5439]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:rval)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [5449]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:good)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name good>
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Pound
                            arg_word: 
                              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <n>}
                          )
                      )
                    }
                  spids: [5464]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:bad)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name bad>
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Pound
                            arg_word: 
                              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>) <n>}
                          )
                      )
                    }
                  spids: [5473]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$good'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$good'))})
                        (C {($ Id.VSub_DollarName '$MANPAGER')})
                      ]
                      negated: F
                    )
                  ]
                  spids: [5483 5496]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$bad'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$bad'))}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                  ]
                  spids: [5516 5529]
                )
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName '$rval')}
            )
          ]
        )
    )
    (command.ShFunction
      name: setup_cattool
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.bz>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ </usr/bin/bzcat>)}
                          spids: [5581]
                        )
                      ]
                    )
                  ]
                  spids: [5577 5579 5586 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.bz2>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ </usr/bin/bzcat>)}
                          spids: [5593]
                        )
                      ]
                    )
                  ]
                  spids: [5589 5591 5598 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.gz>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ </usr/bin/zcat>)}
                          spids: [5605]
                        )
                      ]
                    )
                  ]
                  spids: [5601 5603 5610 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.lzma>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ </usr/bin/lzcat>)}
                          spids: [5617]
                        )
                      ]
                    )
                  ]
                  spids: [5613 5615 5622 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.xz>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ </usr/bin/xzcat>)}
                          spids: [5629]
                        )
                      ]
                    )
                  ]
                  spids: [5625 5627 5634 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cattool)
                          op: assign_op.Equal
                          rhs: {(SQ <'/usr/bin/zcat -f'>)}
                          spids: [5640]
                        )
                      ]
                    )
                  ]
                  spids: [5637 5638 5645 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: setup_pager
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$MANPAGER'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-n>} 
                                  {(DQ ($ Id.VSub_DollarName '$MANCOLOR'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANPAGER)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'less -sR'>)}
                                  spids: [5702]
                                )
                              ]
                            )
                          ]
                          spids: [5686 5699]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-n>} 
                                      {(DQ ($ Id.VSub_DollarName '$PAGER'))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:MANPAGER)
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_DollarName '$PAGER'))}
                                      spids: [5727]
                                    )
                                  ]
                                )
                              ]
                              spids: [5711 5724]
                            )
                          ]
                          else_action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:MANPAGER)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'more -s'>)}
                                  spids: [5736]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [5670 5683]
                )
              ]
            )
            (C {<decho>} {(DQ <'Using pager: '> ($ Id.VSub_DollarName '$MANPAGER'))})
          ]
        )
    )
    (command.ShFunction
      name: trim
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tstr)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [5774]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$tstr'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_LBracket '['> 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\ '>
                              ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:tstr)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name tstr>
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_DPound
                                              arg_word: 
                                                {<'['> 
                                                  (word_part.EscapedLiteral
                                                    token: <Id.Lit_EscapedChar '\\ '>
                                                  ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <']'>
                                                }
                                            )
                                        )
                                      )
                                    }
                                  spids: [5802]
                                )
                              ]
                            )
                          ]
                          spids: [5795 5800 5814 -1]
                        )
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> <Id.Lit_LBracket '['> 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\ '>
                              ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <Id.Lit_RBracket ']'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:tstr)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name tstr>
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_DPercent
                                              arg_word: 
                                                {<'['> 
                                                  (word_part.EscapedLiteral
                                                    token: <Id.Lit_EscapedChar '\\ '>
                                                  ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\t'>) <']'>
                                                }
                                            )
                                        )
                                      )
                                    }
                                  spids: [5824]
                                )
                              ]
                            )
                          ]
                          spids: [5817 5822 5836 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                          spids: [5839 5840 5844 -1]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: whatis_parse_args
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<cmd_arg>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<getopts>} {(SQ <d>)} {<cmd_arg>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ (${ Id.VSub_Name cmd_arg))}
                      arms: [
                        (case_arm
                          pat_list: [{<d>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:debug)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ Id.VSub_DollarName '$debug')}
                                              )
                                            right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                          )
                                      )
                                    }
                                  spids: [5901]
                                )
                              ]
                            )
                          ]
                          spids: [5898 5899 5913 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<whatis_usage>})]
                          spids: [5916 5917 5921 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
            (C {<shift>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Minus
                      left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$OPTIND')})
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                    )
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:keywords)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Star '$*'))}
                  spids: [5949]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: whatis_usage
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {(DQ <'usage: '> ($ Id.VSub_DollarName '$cmd') <' [-d] keyword [...]'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: do_apropos
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {<stat>} {<-f>} {<Id.Lit_Other '%'> <i>} {</usr/bin/man>})]
                        )
                    )
                  } {<-ne>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {<stat>} {<-f>} {<Id.Lit_Other '%'> <i>} {</usr/bin/apropos>})]
                        )
                    )
                  } {<Id.Lit_RBracket ']'>}
                )
                (C {<exec>} {<apropos>} {(DQ ($ Id.VSub_At '$@'))})
              ]
            )
            (C {<search_whatis>} {<apropos>} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: do_man
      body: 
        (command.BraceGroup
          children: [
            (C {<man_parse_args>} {(DQ ($ Id.VSub_At '$@'))})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$pages'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(SQ <'What manual page do you want?'>)}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [6064 6077]
                )
              ]
            )
            (C {<man_setup>})
            (command.ForEach
              iter_name: page
              iter_words: [{($ Id.VSub_DollarName '$pages')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<decho>} {(DQ <'Searching for '> ($ Id.VSub_DollarName '$page'))})
                    (C {<man_find_and_display>} {(DQ ($ Id.VSub_DollarName '$page'))})
                  ]
                )
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: 
                {
                  (braced_var_sub
                    token: <Id.VSub_Name ret>
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<0>})
                  )
                }
            )
          ]
        )
    )
    (command.ShFunction
      name: do_manpath
      body: 
        (command.BraceGroup
          children: [
            (C {<manpath_parse_args>} {(DQ ($ Id.VSub_At '$@'))})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$qflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<manpath_warnings>})]
                  spids: [6158 6171]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$Lflag'))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<build_manlocales>}) (C {<echo>} {($ Id.VSub_DollarName '$MANLOCALES')})]
                  spids: [6180 6193]
                )
              ]
              else_action: [(C {<build_manpath>}) (C {<echo>} {($ Id.VSub_DollarName '$MANPATH')})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: do_whatis
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {<stat>} {<-f>} {<Id.Lit_Other '%'> <i>} {</usr/bin/man>})]
                        )
                    )
                  } {<-ne>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {<stat>} {<-f>} {<Id.Lit_Other '%'> <i>} {</usr/bin/whatis>})]
                        )
                    )
                  } {<Id.Lit_RBracket ']'>}
                )
                (C {<exec>} {<whatis>} {(DQ ($ Id.VSub_At '$@'))})
              ]
            )
            (C {<search_whatis>} {<whatis>} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:EQN)
          op: assign_op.Equal
          rhs: {<eqn>}
          spids: [6287]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:NROFF)
          op: assign_op.Equal
          rhs: {(SQ <'groff -S -P-h -Wall -mtty-char -man'>)}
          spids: [6290]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PIC)
          op: assign_op.Equal
          rhs: {<pic>}
          spids: [6295]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REFER)
          op: assign_op.Equal
          rhs: {<refer>}
          spids: [6298]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TBL)
          op: assign_op.Equal
          rhs: {<tbl>}
          spids: [6301]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TROFF)
          op: assign_op.Equal
          rhs: {(SQ <'groff -S -man'>)}
          spids: [6304]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VGRIND)
          op: assign_op.Equal
          rhs: {<vgrind>}
          spids: [6309]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LOCALE)
          op: assign_op.Equal
          rhs: {</usr/bin/locale>}
          spids: [6313]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:STTY)
          op: assign_op.Equal
          rhs: {</bin/stty>}
          spids: [6316]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SYSCTL)
          op: assign_op.Equal
          rhs: {</sbin/sysctl>}
          spids: [6319]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:debug)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6323]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:man_default_sections)
          op: assign_op.Equal
          rhs: {(SQ <'1:8:2:3:n:4:5:6:7:9:l'>)}
          spids: [6326]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:man_default_path)
          op: assign_op.Equal
          rhs: {(SQ <'/usr/share/man:/usr/share/openssl/man:/usr/local/man'>)}
          spids: [6331]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:cattool)
          op: assign_op.Equal
          rhs: {(SQ <'/usr/bin/zcat -f'>)}
          spids: [6336]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:config_global)
          op: assign_op.Equal
          rhs: {(SQ </etc/man.conf>)}
          spids: [6342]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:config_local)
          op: assign_op.Equal
          rhs: {(SQ <'/usr/local/etc/man.d/*.conf'>)}
          spids: [6351]
        )
      ]
    )
    (C {<Id.KW_Set set>} {<-f>})
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$0'))}
      arms: [
        (case_arm
          pat_list: [{<Id.Lit_Star '*'> <apropos>}]
          action: [(C {<do_apropos>} {(DQ ($ Id.VSub_At '$@'))})]
          spids: [6373 6375 6383 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'> <manpath>}]
          action: [(C {<do_manpath>} {(DQ ($ Id.VSub_At '$@'))})]
          spids: [6385 6387 6395 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'> <whatis>}]
          action: [(C {<do_whatis>} {(DQ ($ Id.VSub_At '$@'))})]
          spids: [6397 6399 6407 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [(C {<do_man>} {(DQ ($ Id.VSub_At '$@'))})]
          spids: [6409 6410 6418 -1]
        )
      ]
    )
  ]
)