(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tracing)
          op: Equal
          rhs: {(/sys/kernel/debug/tracing)}
          spids: [124]
        )
      ]
      spids: [124]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:flock)
          op: Equal
          rhs: {(/var/tmp/.ftrace-lock)}
          spids: [127]
        )
      ]
      spids: [127]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:bufsize_kb) op:Equal rhs:{(4096)} spids:[130])]
      spids: [130]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_device) op:Equal rhs:{(0)} spids:[133])]
          spids: [133]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:device) op:Equal rhs:{(EmptyPart)} spids:[137])]
          spids: [137]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_iotype) op:Equal rhs:{(0)} spids:[140])]
          spids: [140]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:iotype) op:Equal rhs:{(EmptyPart)} spids:[144])]
          spids: [144]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:opt_timestamp) op:Equal rhs:{(0)} spids:[147])]
      spids: [147]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_interval) op:Equal rhs:{(0)} spids:[150])]
          spids: [150]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:interval) op:Equal rhs:{(1)} spids:[154])]
          spids: [154]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_count) op:Equal rhs:{(0)} spids:[158])]
          spids: [158]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:count) op:Equal rhs:{(0)} spids:[162])]
          spids: [162]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:opt_queue) op:Equal rhs:{(0)} spids:[166])]
      spids: [166]
    )
    (C {(trap)} {(SQ <':'>)} {(INT)} {(QUIT)} {(TERM)} {(PIPE)} {(HUP)})
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLessDash
                  fd: 16777215
                  body: 
                    {
                      (DQ ('USAGE: iolatency [-hQT] [-d device] [-i iotype] [interval [count]]\n') 
                        ('                 -d device       # device string (eg, ') (Right_DoubleQuote '"') ('202,1)\n') 
                        (
"                 -i iotype       # match type (eg, '*R*' for all reads)\n"
                        ) ('                 -Q              # use queue insert as start time\n') 
                        ('                 -T              # timestamp on output\n') ('                 -h              # this usage message\n') 
                        (
'                 interval        # summary interval, seconds (default 1)\n'
                        ) ('                 count           # number of summaries\n') ('  eg,\n') 
                        ('       iolatency                 # summarize latency every second\n') ('       iolatency -Q              # include block I/O queue time\n') 
                        ('       iolatency 5 2             # 2 x 5 second summaries\n') ("       iolatency -i '*R*'        # trace reads\n") 
                        ('       iolatency -d 202,1        # trace device 202,1 only\n') ('\n') ('See the man page and example file for more info.\n')
                      )
                    }
                  do_expansion: True
                  here_end: END
                  was_filled: T
                  spids: [198]
                )
                (Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[201])
              ]
            )
            (ControlFlow token:<ControlFlow_Exit exit>)
          ]
          spids: [193]
        )
      spids: [189 192]
    )
    (FuncDef
      name: warn
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (Pipeline children:[(C {(eval)} {(DQ ($ VSub_At '$@'))})] negated:T)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('WARNING: command failed ') 
                            (EscapedLiteralPart
                              token: <Lit_EscapedChar '\\"'>
                            ) ($ VSub_At '$@') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                          )
                        }
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[252])]
                    )
                  ]
                  spids: [16777215 247]
                )
              ]
              spids: [16777215 263]
            )
          ]
          spids: [233]
        )
      spids: [229 232]
    )
    (FuncDef
      name: end
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[281])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ('Ending tracing...'))}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[291])]
            )
            (C {(cd)} {($ VSub_Name '$tracing')})
            (C {(warn)} {(DQ ('echo 0 > events/block/') ($ VSub_Name '$b_start') (/enable))})
            (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/enable'))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DPipe
                              left: (ArithVarRef name:opt_device)
                              right: (ArithVarRef name:opt_iotype)
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(warn)} {(DQ ('echo 0 > events/block/') ($ VSub_Name '$b_start') (/filter))})
                    (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/filter'))})
                  ]
                  spids: [16777215 330]
                )
              ]
              spids: [16777215 349]
            )
            (C {(warn)} {(DQ ('echo > trace'))})
            (AndOr
              ops: [Op_DAmp]
              children: [
                (DParen child:(ArithVarRef name:wroteflock))
                (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))})
              ]
            )
          ]
          spids: [272]
        )
      spids: [268 271]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[387])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [382]
        )
      spids: [378 381]
    )
    (FuncDef
      name: edie
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[415])]
            )
            (SimpleCommand
              words: [{(exec)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(/dev/null)}
                  spids: [425]
                )
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[428])
              ]
            )
            (C {(end)})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [406]
        )
      spids: [402 405]
    )
    (While
      cond: [(C {(getopts)} {(d) (Lit_Other ':') (hi) (Lit_Other ':') (QT)} {(opt)})]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {($ VSub_Name '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(d)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_device)
                              op: Equal
                              rhs: {(1)}
                              spids: [470]
                            )
                          ]
                          spids: [470]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:device)
                          op: Equal
                          rhs: {($ VSub_Name '$OPTARG')}
                          spids: [474]
                        )
                      ]
                      spids: [474]
                    )
                  ]
                  spids: [467 468 477 16777215]
                )
                (case_arm
                  pat_list: [{(i)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_iotype)
                              op: Equal
                              rhs: {(1)}
                              spids: [483]
                            )
                          ]
                          spids: [483]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:iotype)
                          op: Equal
                          rhs: {($ VSub_Name '$OPTARG')}
                          spids: [487]
                        )
                      ]
                      spids: [487]
                    )
                  ]
                  spids: [480 481 490 16777215]
                )
                (case_arm
                  pat_list: [{(Q)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_queue)
                          op: Equal
                          rhs: {(1)}
                          spids: [496]
                        )
                      ]
                      spids: [496]
                    )
                  ]
                  spids: [493 494 499 16777215]
                )
                (case_arm
                  pat_list: [{(T)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_timestamp)
                          op: Equal
                          rhs: {(1)}
                          spids: [505]
                        )
                      ]
                      spids: [505]
                    )
                  ]
                  spids: [502 503 508 16777215]
                )
                (case_arm
                  pat_list: [{(h)} {(Lit_Other '?')}]
                  action: [(C {(usage)})]
                  spids: [511 514 518 16777215]
                )
              ]
              spids: [460 464 521]
            )
          ]
          spids: [457 523]
        )
    )
    (C {(shift)} 
      {
        (ArithSubPart
          anode: 
            (ArithBinary
              op_id: Arith_Minus
              left: (ArithWord w:{($ VSub_Name '$OPTIND')})
              right: (ArithWord w:{(Lit_Digits 1)})
            )
          spids: [527 536]
        )
      }
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:opt_interval) op:Equal rhs:{(1)} spids:[551])]
              spids: [551]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:interval)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [555]
                )
              ]
              spids: [555]
            )
            (C {(shift)})
          ]
          spids: [16777215 548]
        )
      ]
      spids: [16777215 561]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:opt_count) op:Equal rhs:{(1)} spids:[576])]
              spids: [576]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:count)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [580]
                )
              ]
              spids: [580]
            )
          ]
          spids: [16777215 573]
        )
      ]
      spids: [16777215 583]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_device))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:major)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(',*')})
                        spids: [599 603]
                      )
                    }
                  spids: [598]
                )
              ]
              spids: [598]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:minor)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('*,')})
                        spids: [607 611]
                      )
                    }
                  spids: [606]
                )
              ]
              spids: [606]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dev)
                  op: Equal
                  rhs: 
                    {
                      (ArithSubPart
                        anode: 
                          (ArithBinary
                            op_id: Arith_Plus
                            left: 
                              (ArithBinary
                                op_id: Arith_DLess
                                left: (ArithVarRef name:major)
                                right: (ArithWord w:{(Lit_Digits 20)})
                              )
                            right: (ArithVarRef name:minor)
                          )
                        spids: [615 630]
                      )
                    }
                  spids: [614]
                )
              ]
              spids: [614]
            )
          ]
          spids: [16777215 595]
        )
      ]
      spids: [16777215 632]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_queue)) terminator:<Op_Semi ';'>)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:b_start)
                  op: Equal
                  rhs: {(block_rq_insert)}
                  spids: [647]
                )
              ]
              spids: [647]
            )
          ]
          spids: [16777215 644]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:b_start)
              op: Equal
              rhs: {(block_rq_issue)}
              spids: [653]
            )
          ]
          spids: [653]
        )
      ]
      spids: [650 656]
    )
    (AndOr
      ops: [Op_DAmp Op_DPipe]
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(/usr/bin/mawk)}))
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:awk)
              op: Equal
              rhs: {(SQ <'mawk -W interactive'>)}
              spids: [672]
            )
          ]
          spids: [672]
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:awk) op:Equal rhs:{(awk)} spids:[679])]
          spids: [679]
        )
      ]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (C {(cd)} {($ VSub_Name '$tracing')})
        (C {(die)} 
          {
            (DQ ('ERROR: accessing tracing. Root user? Kernel has FTRACE?\n') 
              ('    debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)')
            )
          }
        )
      ]
    )
    (AndOr
      ops: [Op_DAmp]
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_e child:{($ VSub_Name '$flock')}))
        (C {(die)} 
          {
            (DQ ('ERROR: ftrace may be in use by PID ') 
              (CommandSubPart
                command_list: (CommandList children:[(C {(cat)} {($ VSub_Name '$flock')})])
                left_token: <Left_CommandSub '$('>
                spids: [717 721]
              ) (' ') ($ VSub_Name '$flock')
            )
          }
        )
      ]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (SimpleCommand
          words: [{(echo)} {($ VSub_Dollar '$$')}]
          redirects: [
            (Redir
              op_id: Redir_Great
              fd: 16777215
              arg_word: {($ VSub_Name '$flock')}
              spids: [730]
            )
          ]
        )
        (C {(die)} {(DQ ('ERROR: unable to write ') ($ VSub_Name '$flock') (.))})
      ]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:wroteflock) op:Equal rhs:{(1)} spids:[744])]
      spids: [744]
    )
    (C {(warn)} {(DQ ('echo nop > current_tracer'))})
    (C {(warn)} {(DQ ('echo ') ($ VSub_Name '$bufsize_kb') (' > buffer_size_kb'))})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:filter) op:Equal rhs:{(EmptyPart)} spids:[765])]
      spids: [765]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_iotype))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:filter)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('rwbs ~ ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                        ($ VSub_Name '$iotype') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                      )
                    }
                  spids: [780]
                )
              ]
              spids: [780]
            )
          ]
          spids: [16777215 777]
        )
      ]
      spids: [16777215 788]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_device))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{(DQ ($ VSub_Name '$filter'))} right:{(DQ )})
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:filter)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name '$filter') (' && '))}
                      spids: [818]
                    )
                  ]
                  spids: [818]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:filter)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name filter) ('dev == ') ($ VSub_Name '$dev'))}
                  spids: [825]
                )
              ]
              spids: [825]
            )
          ]
          spids: [16777215 800]
        )
      ]
      spids: [16777215 834]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DParen
                  child: 
                    (ArithBinary
                      op_id: Arith_DPipe
                      left: (ArithVarRef name:opt_iotype)
                      right: (ArithVarRef name:opt_device)
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: 16777215
                                  arg_word: {(events/block/) ($ VSub_Name '$b_start') (/filter)}
                                  spids: [863]
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: 16777215
                                  arg_word: {(events/block/block_rq_complete/filter)}
                                  spids: [881]
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -d or -t filter. Exiting.'))})]
                  spids: [16777215 886]
                )
              ]
              spids: [16777215 896]
            )
          ]
          spids: [16777215 850]
        )
      ]
      spids: [16777215 898]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  ops: [Op_DPipe]
                  children: [
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(events/block/) ($ VSub_Name '$b_start') (/enable)}
                              spids: [908]
                            )
                          ]
                        )
                      ]
                      negated: T
                    )
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(events/block/block_rq_complete/enable)}
                              spids: [924]
                            )
                          ]
                        )
                      ]
                      negated: T
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(edie)} {(DQ ('ERROR: enabling block I/O tracepoints. Exiting.'))})]
          spids: [16777215 929]
        )
      ]
      spids: [16777215 938]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:etext) op:Equal rhs:{(EmptyPart)} spids:[940])]
      spids: [940]
    )
    (AndOr
      ops: [Op_DAmp]
      children: [
        (DParen child:(ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_count)))
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:etext)
              op: Equal
              rhs: {(DQ (' Ctrl-C to end.'))}
              spids: [952]
            )
          ]
          spids: [952]
        )
      ]
    )
    (C {(echo)} 
      {
        (DQ ('Tracing block I/O. Output every ') ($ VSub_Name '$interval') (' seconds.') 
          ($ VSub_Name '$etext')
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:offset)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {($ VSub_Name '$awk')} 
                        {
                          (SQ <'BEGIN { o = 0; }\n'> 
                            <'\t$1 == "#" && $2 ~ /TASK/ && NF == 6 { o = 1; }\n'> <'\t$2 ~ /TASK/ { print o; exit }'>
                          )
                        } {(trace)}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [989 999]
              )
            }
          spids: [988]
        )
      ]
      spids: [988]
    )
    (C {(warn)} {(DQ ('echo > trace'))})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1011])]
      spids: [1011]
    )
    (Pipeline
      children: [
        (While
          cond: [
            (Sentence
              child: 
                (DParen
                  child: 
                    (ArithBinary
                      op_id: Arith_DPipe
                      left: (ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_count))
                      right: 
                        (ArithBinary
                          op_id: Arith_Less
                          left: (ArithVarRef name:i)
                          right: (ArithVarRef name:count)
                        )
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          body: 
            (DoGroup
              children: [
                (DParen
                  child: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
                )
                (C {(sleep)} {($ VSub_Name '$interval')})
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(snapshot)}))
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(snapshot)}
                              spids: [1075]
                            )
                          ]
                        )
                        (SimpleCommand
                          words: [{(echo)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(trace)}
                              spids: [1082]
                            )
                          ]
                        )
                        (C {(cat)} {(snapshot)})
                      ]
                      spids: [16777215 1068]
                    )
                  ]
                  else_action: [
                    (C {(cat)} {(trace)})
                    (SimpleCommand
                      words: [{(echo)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(trace)}
                          spids: [1102]
                        )
                      ]
                    )
                  ]
                  spids: [1092 1107]
                )
                (AndOr
                  ops: [Op_DAmp]
                  children: [
                    (DParen child:(ArithVarRef name:opt_timestamp))
                    (C {(printf)} {(DQ ('time %(%H:%M:%S)T:') (Lit_Other '\\') (n))} {(-1)})
                  ]
                )
                (C {(echo)} {(DQ (tick))})
              ]
              spids: [1035 1137]
            )
        )
        (C {($ VSub_Name '$awk')} {(-v)} {(Lit_VarLike 'o=') ($ VSub_Name '$offset')} {(-v)} 
          {(Lit_VarLike 'opt_timestamp=') ($ VSub_Name '$opt_timestamp')} {(-v)} {(Lit_VarLike 'b_start=') ($ VSub_Name '$b_start')} 
          {
            (SQ <'\n'> <'\tfunction star(sval, smax, swidth) {\n'> <'\t\tstars = ""\n'> 
              <'\t\tif (smax == 0) return ""\n'> <'\t\tfor (si = 0; si < (swidth * sval / smax); si++) {\n'> <'\t\t\tstars = stars "#"\n'> <'\t\t}\n'> 
              <'\t\treturn stars\n'> <'\t}\n'> <'\n'> <'\tBEGIN { max_i = 0 }\n'> <'\n'> <'\t# common fields\n'> <'\t$1 != "#" {\n'> 
              <'\t\ttime = $(3+o); sub(":", "", time)\n'> <'\t\tdev = $(5+o)\n'> <'\t}\n'> <'\n'> <'\t# block I/O request\n'> <'\t$1 != "#" && $0 ~ b_start {\n'> 
              <'\t\t#\n'> <'\t\t# example: (fields1..4+o) 202,1 W 0 () 12862264 + 8 [tar]\n'> 
              <'\t\t# The cmd field "()" might contain multiple words (hex),\n'> <'\t\t# hence stepping from the right (NF-3).\n'> <'\t\t#\n'> <'\t\tloc = $(NF-3)\n'> 
              <'\t\tstarts[dev, loc] = time\n'> <'\t\tnext\n'> <'\t}\n'> <'\n'> <'\t# block I/O completion\n'> <'\t$1 != "#" && $0 ~ /rq_complete/ {\n'> 
              <'\t\t#\n'> <'\t\t# example: (fields1..4+o) 202,1 W () 12862256 + 8 [0]\n'> <'\t\t#\n'> <'\t\tdir = $(6+o)\n'> 
              <'\t\tloc = $(NF-3)\n'> <'\n'> <'\t\tif (starts[dev, loc] > 0) {\n'> <'\t\t\tlatency_ms = 1000 * (time - starts[dev, loc])\n'> 
              <'\t\t\ti = 0\n'> <'\t\t\tfor (ms = 1; latency_ms > ms; ms *= 2) { i++ }\n'> <'\t\t\thist[i]++\n'> 
              <'\t\t\tif (i > max_i)\n'> <'\t\t\t\tmax_i = i\n'> <'\t\t\tdelete starts[dev, loc]\n'> <'\t\t}\n'> <'\t\tnext\n'> <'\t}\n'> <'\n'> 
              <'\t# timestamp\n'> <'\t$1 == "time" {\n'> <'\t\tlasttime = $2\n'> <'\t}\n'> <'\n'> <'\t# print summary\n'> 
              <'\t$1 == "tick" {\n'> <'\t\tprint ""\n'> <'\t\tif (opt_timestamp)\n'> <'\t\t\tprint lasttime\n'> <'\n'> 
              <'\t\t# find max value\n'> <'\t\tmax_v = 0\n'> <'\t\tfor (i = 0; i <= max_i; i++) {\n'> <'\t\t\tif (hist[i] > max_v)\n'> 
              <'\t\t\t\tmax_v = hist[i]\n'> <'\t\t}\n'> <'\n'> <'\t\t# print histogram\n'> 
              <'\t\tprintf "%8s .. %-8s: %-8s |%-38s|\\n", ">=(ms)", "<(ms)",\n'> <'\t\t    "I/O", "Distribution"\n'> <'\t\tms = 1\n'> <'\t\tfrom = 0\n'> 
              <'\t\tfor (i = 0; i <= max_i; i++) {\n'> <'\t\t\tprintf "%8d -> %-8d: %-8d |%-38s|\\n", from, ms,\n'> 
              <'\t\t\t    hist[i], star(hist[i], max_v, 38)\n'> <'\t\t\tfrom = ms\n'> <'\t\t\tms *= 2\n'> <'\t\t}\n'> <'\t\tfflush()\n'> <'\t\tdelete hist\n'> 
              <'\t\tdelete starts\t# invalid if events missed between snapshots\n'> <'\t\tmax_i = 0\n'> <'\t}\n'> <'\n'> 
              <'\t$0 ~ /LOST.*EVENTS/ { print "WARNING: " $0 > "/dev/stderr" }\n'>
            )
          }
        )
      ]
      negated: F
    )
    (C {(end)})
  ]
)