(CommandList
  children: [
    (FuncDef
      name: check
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [78]
                )
              ]
              spids: [78]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sym)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [82]
                )
              ]
              spids: [82]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vis)
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [86]
                )
              ]
              spids: [86]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:found)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(grep)} 
                                {
                                  (DQ (' ') ($ VSub_Name '$sym') 
                                    (EscapedLiteralPart
                                      token: <Lit_EscapedChar '\\$'>
                                    )
                                  )
                                } {($ VSub_Name '$file')}
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [92 102]
                      )
                    }
                  spids: [91]
                )
              ]
              spids: [91]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$found'))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Symbol ') ($ VSub_Name '$sym') (' not found.'))})
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 116]
                )
              ]
              spids: [16777215 133]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:match_vis)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(grep)} 
                                    {
                                      (DQ (' ') ($ VSub_Name '$sym') 
                                        (EscapedLiteralPart
                                          token: <Lit_EscapedChar '\\$'>
                                        )
                                      )
                                    } {($ VSub_Name '$file')}
                                  )
                                  (C {(grep)} {(DQ (' ') ($ VSub_Name '$vis') (' '))})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [138 158]
                      )
                    }
                  spids: [137]
                )
              ]
              spids: [137]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(test)} {(-z)} {(DQ ($ VSub_Name '$match_vis'))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('Expected symbol ') ($ VSub_Name '$sym') (' to have visibility ') 
                          ($ VSub_Name '$vis') (' but found')
                        )
                      }
                    )
                    (C {(echo)} {(DQ ($ VSub_Name '$found'))})
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 172]
                )
              ]
              spids: [16777215 198]
            )
          ]
          spids: [75]
        )
      spids: [71 74]
    )
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib1_default))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib1_protected))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib1_internal))} {(DQ (INTERNAL))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib1_hidden))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib2_default))} {(DQ (DEFAULT))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib2_protected))} {(DQ (PROTECTED))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib2_internal))} {(DQ (INTERNAL))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib2_hidden))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib3_default))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib3_protected))} {(DQ (HIDDEN))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib3_internal))} {(DQ (INTERNAL))})
    (C {(check)} {(DQ (exclude_libs_test.syms))} {(DQ (lib3_hidden))} {(DQ (HIDDEN))})
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)