(command.CommandList
  children: [
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [78]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:sym)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [82]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:vis)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [86]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:found)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (C {<grep>} {(DQ <' '> ($ Id.VSub_DollarName '$sym') <Id.Lit_Dollar '$'>)} 
                            {($ Id.VSub_DollarName '$file')}
                          )
                      )
                    }
                  spids: [91]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$found'))})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Symbol '> ($ Id.VSub_DollarName '$sym') <' not found.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [109 120]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:match_vis)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {(DQ <' '> ($ Id.VSub_DollarName '$sym') <Id.Lit_Dollar '$'>)} 
                                {($ Id.VSub_DollarName '$file')}
                              )
                              (C {<grep>} {(DQ <' '> ($ Id.VSub_DollarName '$vis') <' '>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [141]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$match_vis'))})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'Expected symbol '> ($ Id.VSub_DollarName '$sym') <' to have visibility '> 
                          ($ Id.VSub_DollarName '$vis') <' but found'>
                        )
                      }
                    )
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$found'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [169 180]
                )
              ]
            )
          ]
        )
    )
    (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>)})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)