(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tracing spids:[157])
          op: Equal
          rhs: {(/sys/kernel/debug/tracing)}
          spids: [157]
        )
      ]
      spids: [157]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:flock spids:[160])
          op: Equal
          rhs: {(/var/tmp/.ftrace-lock)}
          spids: [160]
        )
      ]
      spids: [160]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_duration spids:[163])
                  op: Equal
                  rhs: {(0)}
                  spids: [163]
                )
              ]
              spids: [163]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:duration spids:[167])
                  op: Equal
                  rhs: (word.EmptyWord)
                  spids: [167]
                )
              ]
              spids: [167]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_pid spids:[170])
                  op: Equal
                  rhs: {(0)}
                  spids: [170]
                )
              ]
              spids: [170]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:pid spids:[174])
                  op: Equal
                  rhs: (word.EmptyWord)
                  spids: [174]
                )
              ]
              spids: [174]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_tid spids:[177])
                  op: Equal
                  rhs: {(0)}
                  spids: [177]
                )
              ]
              spids: [177]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:tid spids:[181])
              op: Equal
              rhs: (word.EmptyWord)
              spids: [181]
            )
          ]
          spids: [181]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:pidtext spids:[183])
                  op: Equal
                  rhs: (word.EmptyWord)
                  spids: [183]
                )
              ]
              spids: [183]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_headers spids:[186])
                  op: Equal
                  rhs: {(0)}
                  spids: [186]
                )
              ]
              spids: [186]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_proc spids:[190])
                  op: Equal
                  rhs: {(0)}
                  spids: [190]
                )
              ]
              spids: [190]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:opt_time spids:[194])
                  op: Equal
                  rhs: {(0)}
                  spids: [194]
                )
              ]
              spids: [194]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:opt_cpu spids:[198])
              op: Equal
              rhs: {(0)}
              spids: [198]
            )
          ]
          spids: [198]
        )
      ]
    )
    (C {(trap)} {(SQ <':'>)} {(INT)} {(QUIT)} {(TERM)} {(PIPE)} {(HUP)})
    (command.FuncDef
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.HereDoc
                  op: <Redir_DLessDash '<<-'>
                  fd: 16777215
                  here_begin: {(END)}
                  here_end_span_id: 251
                  stdin_parts: [
                    (
'USAGE: funcslower [-aChHPt] [-p PID] [-L TID] [-d secs] funcstring latency_us\n'
                    )
                    ('                 -a              # all info (same as -HPt)\n')
                    ('                 -C              # measure on-CPU time only\n')
                    ('                 -d seconds      # trace duration, and use buffers\n')
                    ('                 -h              # this usage message\n')
                    ('                 -H              # include column headers\n')
                    ('                 -p PID          # trace when this pid is on-CPU\n')
                    ('                 -L TID          # trace when this thread is on-CPU\n')
                    ('                 -P              # show process names & PIDs\n')
                    ('                 -t              # show timestamps\n')
                    ('  eg,\n')
                    ('       funcslower vfs_read 10000 # trace vfs_read() slower than 10 ms\n')
                    ('\n')
                    ('See the man page and example file for more info.\n')
                  ]
                )
                (redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})
              ]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit>)
          ]
          spids: [225]
        )
      spids: [221 224]
    )
    (command.FuncDef
      name: warn
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [(C {(eval)} {(DQ ($ VSub_At '$@'))})]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('WARNING: command failed ') 
                            (word_part.EscapedLiteralPart
                              token: <Lit_EscapedChar '\\"'>
                            ) ($ VSub_At '$@') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                          )
                        }
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                  ]
                  spids: [16777215 276]
                )
              ]
              spids: [16777215 292]
            )
          ]
          spids: [262]
        )
      spids: [258 261]
    )
    (command.FuncDef
      name: end
      body: 
        (command.BraceGroup
          children: [
            (command.SimpleCommand
              words: [{(echo)}]
              redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
            )
            (command.SimpleCommand
              words: [{(echo)} {(DQ ('Ending tracing...'))}]
              redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
            )
            (C {(cd)} {($ VSub_DollarName '$tracing')})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_time>)
                  spids: [330 335]
                )
                (C {(warn)} {(DQ ('echo nofuncgraph-abstime > trace_options'))})
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_proc>)
                  spids: [346 351]
                )
                (C {(warn)} {(DQ ('echo nofuncgraph-proc > trace_options'))})
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_cpu>)
                  spids: [362 367]
                )
                (C {(warn)} {(DQ ('echo sleep-time > trace_options'))})
              ]
            )
            (C {(warn)} {(DQ ('echo nop > current_tracer'))})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
                  spids: [386 391]
                )
                (C {(warn)} {(DQ ('echo > set_ftrace_pid'))})
              ]
            )
            (C {(warn)} {(DQ ('echo > set_ftrace_filter'))})
            (C {(warn)} {(DQ ('echo > set_graph_function'))})
            (C {(warn)} {(DQ ('echo 0 > tracing_thresh'))})
            (C {(warn)} {(DQ ('echo > trace'))})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike wroteflock>)
                  spids: [431 436]
                )
                (C {(warn)} {(DQ ('rm ') ($ VSub_DollarName '$flock'))})
              ]
            )
          ]
          spids: [301]
        )
      spids: [297 300]
    )
    (command.FuncDef
      name: die
      body: 
        (command.BraceGroup
          children: [
            (command.SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [454]
        )
      spids: [450 453]
    )
    (command.FuncDef
      name: edie
      body: 
        (command.BraceGroup
          children: [
            (command.SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.SimpleCommand
              words: [{(exec)}]
              redirects: [
                (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})
                (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})
              ]
            )
            (C {(end)})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [478]
        )
      spids: [474 477]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [
        (C {(getopts)} {(aCd) (Lit_Other ':') (hHp) (Lit_Other ':') (L) (Lit_Other ':') (Pt)} {(opt)})
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ VSub_DollarName '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(a)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_headers spids:[544])
                              op: Equal
                              rhs: {(1)}
                              spids: [544]
                            )
                          ]
                          spids: [544]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_proc spids:[548])
                              op: Equal
                              rhs: {(1)}
                              spids: [548]
                            )
                          ]
                          spids: [548]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:opt_time spids:[552])
                          op: Equal
                          rhs: {(1)}
                          spids: [552]
                        )
                      ]
                      spids: [552]
                    )
                  ]
                  spids: [541 542 555 16777215]
                )
                (case_arm
                  pat_list: [{(C)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_cpu spids:[561])
                              op: Equal
                              rhs: {(1)}
                              spids: [561]
                            )
                          ]
                          spids: [561]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [558 559 565 16777215]
                )
                (case_arm
                  pat_list: [{(d)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_duration spids:[571])
                              op: Equal
                              rhs: {(1)}
                              spids: [571]
                            )
                          ]
                          spids: [571]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:duration spids:[575])
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                          spids: [575]
                        )
                      ]
                      spids: [575]
                    )
                  ]
                  spids: [568 569 578 16777215]
                )
                (case_arm
                  pat_list: [{(p)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_pid spids:[584])
                              op: Equal
                              rhs: {(1)}
                              spids: [584]
                            )
                          ]
                          spids: [584]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:pid spids:[588])
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                          spids: [588]
                        )
                      ]
                      spids: [588]
                    )
                  ]
                  spids: [581 582 591 16777215]
                )
                (case_arm
                  pat_list: [{(L)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_tid spids:[597])
                              op: Equal
                              rhs: {(1)}
                              spids: [597]
                            )
                          ]
                          spids: [597]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:tid spids:[601])
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                          spids: [601]
                        )
                      ]
                      spids: [601]
                    )
                  ]
                  spids: [594 595 604 16777215]
                )
                (case_arm
                  pat_list: [{(H)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_headers spids:[610])
                              op: Equal
                              rhs: {(1)}
                              spids: [610]
                            )
                          ]
                          spids: [610]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [607 608 614 16777215]
                )
                (case_arm
                  pat_list: [{(P)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_proc spids:[620])
                              op: Equal
                              rhs: {(1)}
                              spids: [620]
                            )
                          ]
                          spids: [620]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [617 618 624 16777215]
                )
                (case_arm
                  pat_list: [{(t)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_time spids:[630])
                              op: Equal
                              rhs: {(1)}
                              spids: [630]
                            )
                          ]
                          spids: [630]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [627 628 634 16777215]
                )
                (case_arm
                  pat_list: [{(h)} {(Lit_Other '?')}]
                  action: [(C {(usage)})]
                  spids: [637 640 644 16777215]
                )
              ]
              spids: [534 538 647]
            )
          ]
          spids: [531 649]
        )
    )
    (C {(shift)} 
      {
        (word_part.ArithSubPart
          anode: 
            (arith_expr.ArithBinary
              op_id: Arith_Minus
              left: (arith_expr.ArithWord w:{($ VSub_DollarName '$OPTIND')})
              right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
            )
          spids: [653 662]
        )
      }
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen
          child: 
            (arith_expr.ArithBinary
              op_id: Arith_Less
              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
              right: (arith_expr.ArithWord w:{(Lit_Digits 2)})
            )
          spids: [668 677]
        )
        (C {(usage)})
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen
          child: 
            (arith_expr.ArithBinary
              op_id: Arith_DAmp
              left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
              right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_tid>)
            )
          spids: [683 692]
        )
        (C {(edie)} {(DQ ('ERROR: You can use -p or -L but not both.'))})
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:funcs spids:[702])
          op: Equal
          rhs: {(DQ ($ VSub_Number '$1'))}
          spids: [702]
        )
      ]
      spids: [702]
    )
    (C {(shift)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:thresh spids:[709])
          op: Equal
          rhs: {($ VSub_Number '$1')}
          spids: [709]
        )
      ]
      spids: [709]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen
          child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
          spids: [712 717]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:pidtext spids:[721])
              op: Equal
              rhs: {(DQ (' for PID ') ($ VSub_DollarName '$pid'))}
              spids: [721]
            )
          ]
          spids: [721]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen
          child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_tid>)
          spids: [727 732]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:pidtext spids:[736])
              op: Equal
              rhs: {(DQ (' for TID ') ($ VSub_DollarName '$tid'))}
              spids: [736]
            )
          ]
          spids: [736]
        )
      ]
    )
    (C {(printf)} 
      {
        (DQ ('Tracing ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
          ($ VSub_DollarName '$funcs') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_DollarName '$pidtext') 
          (' slower than ') ($ VSub_DollarName '$thresh') (' us')
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>)
                  spids: [757 762]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(echo)} {(DQ (' for ') ($ VSub_DollarName '$duration') (' seconds...'))})]
          spids: [16777215 765]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('... Ctrl-C to end.'))})]
      spids: [776 785]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>)
                  spids: [793 798]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (command.DBracket
                  expr: (bool_expr.BoolUnary op_id:BoolUnary_x child:{(/usr/bin/mawk)})
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:awk spids:[814])
                      op: Equal
                      rhs: {(mawk)}
                      spids: [814]
                    )
                  ]
                  spids: [814]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:awk spids:[819])
                      op: Equal
                      rhs: {(awk)}
                      spids: [819]
                    )
                  ]
                  spids: [819]
                )
              ]
            )
          ]
          spids: [16777215 801]
        )
      ]
      else_action: [
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: (bool_expr.BoolUnary op_id:BoolUnary_x child:{(/usr/bin/gawk)})
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:awk spids:[843])
                      op: Equal
                      rhs: {(gawk)}
                      spids: [843]
                    )
                  ]
                  spids: [843]
                )
              ]
              spids: [16777215 840]
            )
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: (bool_expr.BoolUnary op_id:BoolUnary_x child:{(/usr/bin/mawk)})
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:awk spids:[861])
                      op: Equal
                      rhs: {(DQ ('mawk -W interactive'))}
                      spids: [861]
                    )
                  ]
                  spids: [861]
                )
              ]
              spids: [847 858]
            )
          ]
          else_action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:awk spids:[870])
                  op: Equal
                  rhs: {(awk)}
                  spids: [870]
                )
              ]
              spids: [870]
            )
          ]
          spids: [867 874]
        )
      ]
      spids: [822 876]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(cd)} {($ VSub_DollarName '$tracing')})
        (C {(die)} 
          {
            (DQ ('ERROR: accessing tracing. Root user? Kernel has FTRACE?\n') 
              ('    debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)')
            )
          }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DBracket
          expr: (bool_expr.BoolUnary op_id:BoolUnary_e child:{($ VSub_DollarName '$flock')})
        )
        (C {(die)} 
          {
            (DQ ('ERROR: ftrace may be in use by PID ') 
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [(C {(cat)} {($ VSub_DollarName '$flock')})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [913 917]
              ) (' ') ($ VSub_DollarName '$flock')
            )
          }
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [{(echo)} {($ VSub_Dollar '$$')}]
          redirects: [
            (redir.Redir
              op: <Redir_Great '>'>
              fd: 16777215
              arg_word: {($ VSub_DollarName '$flock')}
            )
          ]
        )
        (C {(die)} {(DQ ('ERROR: unable to write ') ($ VSub_DollarName '$flock') (.))})
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:wroteflock spids:[940])
          op: Equal
          rhs: {(1)}
          spids: [940]
        )
      ]
      spids: [940]
    )
    (C {(sysctl)} {(-q)} {(kernel.ftrace_enabled) (Lit_Other '=') (1)})
    (command.SimpleCommand
      words: [{(read)} {(mode)}]
      redirects: [(redir.Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(current_tracer)})]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DBracket
          expr: 
            (bool_expr.BoolBinary
              op_id: BoolBinary_GlobNEqual
              left: {(DQ ($ VSub_DollarName '$mode'))}
              right: {(DQ (nop))}
            )
        )
        (C {(edie)} {(DQ ('ERROR: ftrace active (current_tracer=') ($ VSub_DollarName '$mode') (')'))})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.SimpleCommand
                      words: [{(echo)} {($ VSub_DollarName '$thresh')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(tracing_thresh)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(edie)} 
              {
                (DQ ('ERROR: setting tracing_thresh to ') ($ VSub_DollarName '$thresh') ('. Exiting.'))
              }
            )
          ]
          spids: [16777215 1003]
        )
      ]
      spids: [16777215 1014]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
                  spids: [1018 1023]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.SimpleCommand
              words: [{(echo)} {(SQ )}]
              redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(set_ftrace_pid)})]
            )
            (command.ForEach
              iter_name: tid
              iter_words: [{(/proc/) ($ VSub_DollarName '$pid') (/task/) (Lit_Other '*')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [
                                        {(echo)}
                                        {
                                          (word_part.BracedVarSub
                                            token: <VSub_Name tid>
                                            suffix_op: 
                                              (suffix_op.StringUnary
                                                op_id: VOp1_DPound
                                                arg_word: {('*') (Lit_Slash /)}
                                              )
                                            spids: [1064 1069]
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_DGreat '>>'>
                                          fd: 16777215
                                          arg_word: {(set_ftrace_pid)}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(edie)} 
                              {
                                (DQ ('ERROR: setting -p ') ($ VSub_DollarName '$pid') 
                                  (' (PID exist?). Exiting.')
                                )
                              }
                            )
                          ]
                          spids: [16777215 1076]
                        )
                      ]
                      spids: [16777215 1088]
                    )
                  ]
                  spids: [1055 1091]
                )
              spids: [1048 1053]
            )
          ]
          spids: [16777215 1026]
        )
      ]
      spids: [16777215 1093]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_tid>)
                  spids: [1097 1102]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {($ VSub_DollarName '$tid')}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(set_ftrace_pid)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(edie)} 
                      {
                        (DQ ('ERROR: setting -L ') ($ VSub_DollarName '$tid') 
                          (' (TID exist?). Exiting.')
                        )
                      }
                    )
                  ]
                  spids: [16777215 1121]
                )
              ]
              spids: [16777215 1133]
            )
          ]
          spids: [16777215 1105]
        )
      ]
      spids: [16777215 1135]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.SimpleCommand
                      words: [{(echo)} {(DQ ($ VSub_DollarName '$funcs'))}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(set_ftrace_filter)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(edie)} 
              {
                (DQ ('ERROR: enabling ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  ($ VSub_DollarName '$funcs') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' filter. Function exist? Exiting.')
                )
              }
            )
          ]
          spids: [16777215 1152]
        )
      ]
      spids: [16777215 1165]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.SimpleCommand
                      words: [{(echo)} {(DQ ($ VSub_DollarName '$funcs'))}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(set_graph_function)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(edie)} 
              {
                (DQ ('ERROR: enabling ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  ($ VSub_DollarName '$funcs') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' graph. Exiting.')
                )
              }
            )
          ]
          spids: [16777215 1182]
        )
      ]
      spids: [16777215 1195]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.SimpleCommand
                      words: [{(echo)} {(function_graph)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(current_tracer)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(edie)} 
              {
                (DQ ('ERROR: setting current_tracer to ') 
                  (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (function_graph) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('. Exiting.')
                )
              }
            )
          ]
          spids: [16777215 1210]
        )
      ]
      spids: [16777215 1223]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_cpu>)
                  spids: [1227 1232]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {(nosleep-time)}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(trace_options)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -C (nosleep-time). Exiting.'))})]
                  spids: [16777215 1251]
                )
              ]
              spids: [16777215 1261]
            )
          ]
          spids: [16777215 1235]
        )
      ]
      spids: [16777215 1263]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_time>)
                  spids: [1270 1275]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {(funcgraph-abstime)}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(trace_options)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -t (funcgraph-abstime). Exiting.'))})]
                  spids: [16777215 1294]
                )
              ]
              spids: [16777215 1304]
            )
          ]
          spids: [16777215 1278]
        )
      ]
      spids: [16777215 1306]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_proc>)
                  spids: [1310 1315]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {(funcgraph-proc)}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(trace_options)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -P (funcgraph-proc). Exiting.'))})]
                  spids: [16777215 1334]
                )
              ]
              spids: [16777215 1344]
            )
          ]
          spids: [16777215 1318]
        )
      ]
      spids: [16777215 1346]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:cat spids:[1352])
          op: Equal
          rhs: {(cat)}
          spids: [1352]
        )
      ]
      spids: [1352]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_proc>)
                  spids: [1357 1362]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cat spids:[1388])
                  op: Equal
                  rhs: 
                    {($ VSub_DollarName '$awk') 
                      (SQ <' "/(^ ---|^$)/ || \\$3 == \\"=>\\" { next } { print \\$0 }"'>)
                    }
                  spids: [1388]
                )
              ]
              spids: [1388]
            )
          ]
          spids: [16777215 1365]
        )
      ]
      spids: [16777215 1394]
    )
    (C {(warn)} {(DQ ('echo > trace'))})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>)
                  spids: [1408 1413]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(sleep)} {($ VSub_DollarName '$duration')})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_headers>)
                          spids: [1426 1431]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {($ VSub_DollarName '$cat')} {(trace)})]
                  spids: [16777215 1434]
                )
              ]
              else_action: [
                (command.Pipeline
                  children: [(C {($ VSub_DollarName '$cat')} {(trace)}) (C {(grep)} {(-v)} {(SQ <'^#'>)})]
                  negated: F
                )
              ]
              spids: [1442 1460]
            )
          ]
          spids: [16777215 1416]
        )
      ]
      else_action: [
        (command.AndOr
          ops: [Op_DAmp]
          children: [
            (command.DParen
              child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_headers>)
              spids: [1469 1474]
            )
            (C {(cat)} {(trace)})
          ]
        )
        (C {(eval)} {($ VSub_DollarName '$cat')} {(trace_pipe)})
      ]
      spids: [1462 1489]
    )
    (C {(end)})
  ]
)