(CommandList
  children: [
    (C {(set)} {(-e)})
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ 
                    (
'Usage: perf-with-kcore <perf sub-command> <perf.data directory> [<sub-command options> [ -- <workload>]]'
                    )
                  )
                }
              ]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ('       <perf sub-command> can be record, script, report or inject'))}
              ]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ('   or: perf-with-kcore fix_buildid_cache_permissions'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [46]
        )
      spids: [42 45]
    )
    (FuncDef
      name: find_perf
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$PERF'))} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(ControlFlow token:<ControlFlow_Return return>)]
                  spids: [16777215 107]
                )
              ]
              spids: [16777215 113]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:PERF)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (AndOr
                                ops: [Op_DPipe]
                                children: [(C {(which)} {(perf)}) (C {(true)})]
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [117 125]
                      )
                    }
                  spids: [116]
                )
              ]
              spids: [116]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$PERF'))} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('Failed to find perf'))}]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 142]
                )
              ]
              spids: [16777215 160]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-x)} {(DQ ($ VSub_Name '$PERF'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('Failed to find perf'))}]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 179]
                )
              ]
              spids: [16777215 197]
            )
            (C {(echo)} {(DQ ('Using ') ($ VSub_Name '$PERF'))})
            (C {(DQ ($ VSub_Name '$PERF'))} {(version)})
          ]
          spids: [90]
        )
      spids: [86 89]
    )
  ]
)