(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: [72]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pattern)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [76]
                )
              ]
            )
            (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 '$pattern'))} 
                            {($ Id.VSub_DollarName '$file')}
                          )
                      )
                    }
                  spids: [80]
                )
              ]
            )
            (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 <'pattern '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                          ($ Id.VSub_DollarName '$pattern') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' not found in file '> 
                          ($ Id.VSub_DollarName '$file') <.>
                        )
                      }
                    )
                    (C {<echo>} {($ Id.VSub_DollarName '$found')})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [94 105]
                )
              ]
            )
          ]
        )
    )
    (C {<check>} {<dyn_weak_ref.stdout>} {(DQ <'.* WEAK .* UND.* weak_ref'>)})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)