(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tracing)
          op: Equal
          rhs: {(/sys/kernel/debug/tracing)}
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:flock) op:Equal rhs:{(/var/tmp/.ftrace-lock)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:bufsize_kb) op:Equal rhs:{(4096)})]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_duration) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:duration) op:Equal rhs:(word.EmptyWord))]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_name) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:name) op:Equal rhs:(word.EmptyWord))]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_pid) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:pid) op:Equal rhs:(word.EmptyWord))]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ftext) op:Equal rhs:(word.EmptyWord))]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_start) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_end) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_device) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:device) op:Equal rhs:(word.EmptyWord))]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Sentence
          child: 
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_iotype) op:Equal rhs:{(0)})]
            )
          terminator: <Op_Semi ';'>
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:iotype) op:Equal rhs:(word.EmptyWord))]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_queue) op:Equal rhs:{(0)})]
    )
    (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: 278
                  stdin_parts: [
                    ('USAGE: iosnoop [-hQst] [-d device] [-i iotype] [-p PID] [-n name]\n')
                    ('               [duration]\n')
                    ('                 -d device       # device string (eg, ')
                    (Right_DoubleQuote '"')
                    ('202,1)\n')
                    ("                 -i iotype       # match type (eg, '*R*' for all reads)\n")
                    ('                 -n name         # process name to match on I/O issue\n')
                    ('                 -p PID          # PID to match on I/O issue\n')
                    ('                 -Q              # use queue insert as start time\n')
                    ('                 -s              # include start time of I/O (s)\n')
                    ('                 -t              # include completion time of I/O (s)\n')
                    ('                 -h              # this usage message\n')
                    ('                 duration        # duration seconds, and use buffers\n')
                    ('  eg,\n')
                    ('       iosnoop                   # watch block I/O live (unbuffered)\n')
                    ('       iosnoop 1                 # trace 1 sec (buffered)\n')
                    ('       iosnoop -Q                # include queueing time in LATms\n')
                    ('       iosnoop -ts               # include start and end timestamps\n')
                    ("       iosnoop -i '*R*'          # trace reads\n")
                    ('       iosnoop -p 91             # show I/O issued when PID 91 is on-CPU\n')
                    ('       iosnoop -Qp 91            # show I/O queued by PID 91, queue time\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>)
          ]
        )
    )
    (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)})]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (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')})
            (C {(warn)} {(DQ ('echo 0 > events/block/') ($ VSub_DollarName '$b_start') (/enable))})
            (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/enable'))})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.ArithBinary
                              op_id: Arith_DPipe
                              left: 
                                (arith_expr.ArithBinary
                                  op_id: Arith_DPipe
                                  left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_device>)
                                  right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_iotype>)
                                )
                              right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(warn)} 
                      {(DQ ('echo 0 > events/block/') ($ VSub_DollarName '$b_start') (/filter))}
                    )
                    (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/filter'))})
                  ]
                )
              ]
            )
            (C {(warn)} {(DQ ('echo > trace'))})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike wroteflock>)
                )
                (C {(warn)} {(DQ ('rm ') ($ VSub_DollarName '$flock'))})
              ]
            )
          ]
        )
    )
    (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)})
          ]
        )
    )
    (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)})
          ]
        )
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [
        (C {(getopts)} 
          {(d) (Lit_Other ':') (hi) (Lit_Other ':') (n) (Lit_Other ':') (p) (Lit_Other ':') (Qst)} {(opt)}
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ VSub_DollarName '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(d)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_device)
                              op: Equal
                              rhs: {(1)}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:device)
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(i)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opt_iotype)
                              op: Equal
                              rhs: {(1)}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:iotype)
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(n)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_name) op:Equal rhs:{(1)})]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:name)
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(p)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_pid) op:Equal rhs:{(1)})]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:pid)
                          op: Equal
                          rhs: {($ VSub_DollarName '$OPTARG')}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Q)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_queue) op:Equal rhs:{(1)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(s)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_start) op:Equal rhs:{(1)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(t)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_end) op:Equal rhs:{(1)})]
                    )
                  ]
                )
                (case_arm pat_list:[{(h)} {(Lit_Other '?')}] action:[(C {(usage)})])
              ]
            )
          ]
        )
    )
    (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)})
            )
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (command.DParen child:(arith_expr.ArithWord w:{($ VSub_Pound '$#')}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:opt_duration) op:Equal rhs:{(1)})]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:duration)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                )
              ]
            )
            (C {(shift)})
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_device>)
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:major)
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(',*')})
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:minor)
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{('*,')})
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:dev)
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: 
                              (arith_expr.ArithBinary
                                op_id: Arith_DLess
                                left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike major>)
                                right: (arith_expr.ArithWord w:{(Lit_Digits 20)})
                              )
                            right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike minor>)
                          )
                      )
                    }
                )
              ]
            )
          ]
        )
      ]
    )
    (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_name>)
            )
        )
        (C {(die)} {(DQ ('ERROR: use either -p or -n.'))})
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>))
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:ftext)
              op: Equal
              rhs: {(DQ (' issued by PID ') ($ VSub_DollarName '$pid'))}
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_name>))
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:ftext)
              op: Equal
              rhs: 
                {
                  (DQ (' issued by process name ') 
                    (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_DollarName '$name') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                  )
                }
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>)
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('Tracing block I/O') ($ VSub_DollarName '$ftext') (' for ') 
                  ($ VSub_DollarName '$duration') (' seconds (buffered)...')
                )
              }
            )
          ]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ('Tracing block I/O') ($ VSub_DollarName '$ftext') ('. Ctrl-C to end.'))})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_queue>))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:b_start)
                  op: Equal
                  rhs: {(block_rq_insert)}
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:b_start) op:Equal rhs:{(block_rq_issue)})]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DPipe]
      children: [
        (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>))
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:use) op:Equal rhs:{(mawk)})]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:use) op:Equal rhs:{(gawk)})]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp Op_DPipe]
      children: [
        (command.DBracket
          expr: (bool_expr.BoolUnary op_id:BoolUnary_x child:{(/usr/bin/) ($ VSub_DollarName '$use')})
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:awk)
              op: Equal
              rhs: {($ VSub_DollarName '$use')}
            )
          ]
        )
        (command.Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:awk) op:Equal rhs:{(awk)})]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:wroteflock) op:Equal rhs:{(1)})]
    )
    (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 '$('>
              ) (' ') ($ 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.SimpleCommand
      words: [{(echo)} {(nop)}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current_tracer)})]
    )
    (C {(warn)} {(DQ ('echo ') ($ VSub_DollarName '$bufsize_kb') (' > buffer_size_kb'))})
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:filter) op:Equal rhs:(word.EmptyWord))]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_iotype>)
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:filter)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('rwbs ~ ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                        ($ VSub_DollarName '$iotype') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                      )
                    }
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_device>)
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.BoolBinary
                      op_id: BoolBinary_GlobNEqual
                      left: {(DQ ($ VSub_DollarName '$filter'))}
                      right: {(DQ )}
                    )
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:filter)
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$filter') (' && '))}
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:filter)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name filter) ('dev == ') ($ VSub_DollarName '$dev'))}
                )
              ]
            )
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:filter_i)
          op: Equal
          rhs: {($ VSub_DollarName '$filter')}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.BoolBinary
                      op_id: BoolBinary_GlobNEqual
                      left: {(DQ ($ VSub_DollarName '$filter_i'))}
                      right: {(DQ )}
                    )
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:filter_i)
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$filter_i') (' && '))}
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:filter_i)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name filter_i) ('common_pid == ') ($ VSub_DollarName '$pid'))}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {(DQ ($ VSub_DollarName '$filter'))}
                      right: {(DQ )}
                    )
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(lhs_expr.LhsName name:filter) op:Equal rhs:{(0)})]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: 
                    (arith_expr.ArithBinary
                      op_id: Arith_DPipe
                      left: 
                        (arith_expr.ArithBinary
                          op_id: Arith_DPipe
                          left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_iotype>)
                          right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_device>)
                        )
                      right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_pid>)
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_DollarName '$filter_i'))}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(events/block/) ($ VSub_DollarName '$b_start') (/filter)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                        (command.Pipeline
                          children: [
                            (command.SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_DollarName '$filter'))}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(events/block/block_rq_complete/filter)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -d or -t filter. Exiting.'))})]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Op_DPipe]
                  children: [
                    (command.Pipeline
                      children: [
                        (command.SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(events/block/) ($ VSub_DollarName '$b_start') (/enable)}
                            )
                          ]
                        )
                      ]
                      negated: T
                    )
                    (command.Pipeline
                      children: [
                        (command.SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(events/block/block_rq_complete/enable)}
                            )
                          ]
                        )
                      ]
                      negated: T
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(edie)} {(DQ ('ERROR: enabling block I/O tracepoints. Exiting.'))})]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_start>))
        (C {(printf)} {(DQ ('%-15s '))} {(DQ (STARTs))})
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (command.DParen child:(arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_end>))
        (C {(printf)} {(DQ ('%-15s '))} {(DQ (ENDs))})
      ]
    )
    (C {(printf)} {(DQ ('%-12.12s %-6s %-4s %-8s %-12s %-6s %8s') (Lit_Other '\\') (n))} {(DQ (COMM))} 
      {(DQ (PID))} {(DQ (TYPE))} {(DQ (DEV))} {(DQ (BLOCK))} {(DQ (BYTES))} {(DQ (LATms))}
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:offset)
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (C {($ VSub_DollarName '$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 '$('>
              )
            }
        )
      ]
    )
    (C {(warn)} {(DQ ('echo > trace'))})
    (command.Pipeline
      children: [
        (command.Subshell
          command_list: 
            (command.CommandList
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: (arith_expr.ArithVarRef token:<Lit_ArithVarLike opt_duration>)
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [(C {(sleep)} {($ VSub_DollarName '$duration')}) (C {(cat)} {(trace)})]
                    )
                  ]
                  else_action: [(C {(cat)} {(trace_pipe)})]
                )
              ]
            )
        )
        (C {($ VSub_DollarName '$awk')} {(-v)} {(Lit_VarLike 'o=') ($ VSub_DollarName '$offset')} {(-v)} 
          {(Lit_VarLike 'opt_name=') ($ VSub_DollarName '$opt_name')} {(-v)} {(Lit_VarLike 'name=') ($ VSub_DollarName '$name')} {(-v)} 
          {(Lit_VarLike 'opt_duration=') ($ VSub_DollarName '$opt_duration')} {(-v)} {(Lit_VarLike 'opt_start=') ($ VSub_DollarName '$opt_start')} {(-v)} 
          {(Lit_VarLike 'opt_end=') ($ VSub_DollarName '$opt_end')} {(-v)} {(Lit_VarLike 'b_start=') ($ VSub_DollarName '$b_start')} 
          {
            (SQ <'\n'> <'\t# common fields\n'> <'\t$1 != "#" {\n'> 
              <'\t\t# task name can contain dashes\n'> <'\t\tcomm = pid = $1\n'> <'\t\tsub(/-[0-9][0-9]*/, "", comm)\n'> <'\t\tsub(/.*-/, "", pid)\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\tif (opt_name && match(comm, name) == 0)\n'> <'\t\t\tnext\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\tcomms[dev, loc] = comm\n'> <'\t\tpids[dev, loc] = pid\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'> <'\t\tnsec = $(NF-1)\n'> <'\n'> 
              <'\t\tif (starts[dev, loc] > 0) {\n'> <'\t\t\tlatency = sprintf("%.2f",\n'> <'\t\t\t    1000 * (time - starts[dev, loc]))\n'> 
              <'\t\t\tcomm = comms[dev, loc]\n'> <'\t\t\tpid = pids[dev, loc]\n'> <'\n'> <'\t\t\tif (opt_start)\n'> 
              <'\t\t\t\tprintf "%-15s ", starts[dev, loc]\n'> <'\t\t\tif (opt_end)\n'> <'\t\t\t\tprintf "%-15s ", time\n'> 
              <'\t\t\tprintf "%-12.12s %-6s %-4s %-8s %-12s %-6s %8s\\n",\n'> <'\t\t\t    comm, pid, dir, dev, loc, nsec * 512, latency\n'> <'\t\t\tif (!opt_duration)\n'> 
              <'\t\t\t\tfflush()\n'> <'\n'> <'\t\t\tdelete starts[dev, loc]\n'> <'\t\t\tdelete comms[dev, loc]\n'> 
              <'\t\t\tdelete pids[dev, loc]\n'> <'\t\t}\n'> <'\t\tnext\n'> <'\t}\n'> <'\n'> 
              <'\t$0 ~ /LOST.*EVENTS/ { print "WARNING: " $0 > "/dev/stderr" }\n'>
            )
          }
        )
      ]
      negated: F
    )
    (C {(end)})
  ]
)