(command.CommandList
  children: [
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> 
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<basename>} {($ Id.VSub_Number '$0')})
                    ) <' file|device string'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:COLUMNS)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<tput>} {<cols>}))}
          spids: [75]
        )
      ]
    )
    (command.ShFunction
      name: progress
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:DONE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Slash
                            left: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Star
                                left: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Minus
                                    left: {($ Id.VSub_DollarName '$COLUMNS')}
                                    right: {<Id.Lit_Digits 2>}
                                  )
                                right: {($ Id.VSub_Number '$1')}
                              )
                            right: {<Id.Lit_Digits 100>}
                          )
                      )
                    }
                  spids: [93]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TODO)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Minus
                            left: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Minus
                                left: {($ Id.VSub_DollarName '$COLUMNS')}
                                right: {<Id.Lit_Digits 2>}
                              )
                            right: {($ Id.VSub_DollarName '$DONE')}
                          )
                      )
                    }
                  spids: [112]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:DONE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<printf>} {(DQ <'%'> (${ Id.VSub_Name DONE) <s>)})
                              (C {<tr>} {(SQ <' '>)} {<Id.Lit_Equals '='>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [123]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TODO)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<printf>} {(DQ <'%'> (${ Id.VSub_Name TODO) <s>)})
                              (C {<tr>} {(SQ <' '>)} {<->})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [147]
                )
              ]
            )
            (command.Simple
              words: [
                {<printf>}
                {
                  (DQ <'['> ($ Id.VSub_DollarName '$DONE') ($ Id.VSub_DollarName '$TODO') <']'> 
                    <Id.Lit_BadBackslash '\\'> <r>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/tty'>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: print
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CLEAR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<printf>} {(DQ <'%'> (${ Id.VSub_Name COLUMNS) <s>)})
                      )
                    }
                  spids: [199]
                )
              ]
            )
            (C {<printf>} {(DQ ($ Id.VSub_DollarName '$CLEAR') <Id.Lit_BadBackslash '\\'> <r>)})
            (C {<echo>} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ne>} {<2>} {<Id.Lit_RBracket ']'>})
        (C {<usage>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DISK)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [245]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:STRING)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$2'))}
          spids: [250]
        )
      ]
    )
    (C {<export>} {<Id.Lit_VarLike 'LANG='> <C>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CHUNK_SIZE)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Star
                    left: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Star
                        left: {<Id.Lit_Digits 8>}
                        right: {<Id.Lit_Digits 1024>}
                      )
                    right: {<Id.Lit_Digits 1024>}
                  )
              )
            }
          spids: [280]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-b>} {(DQ ($ Id.VSub_DollarName '$DISK'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:SIZE)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (C {<'/sbin/blockdev'>} {<--getsize64>} {($ Id.VSub_DollarName '$DISK')})
                          )
                        }
                      spids: [306]
                    )
                  ]
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Exit exit>
                  arg_word: {($ Id.VSub_QMark '$?')}
                )
              ]
            )
          ]
          spids: [290 303]
        )
      ]
      else_action: [
        (command.AndOr
          ops: [Id.Op_DPipe]
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SIZE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<stat>} {<--format>} {<Id.Lit_Other '%'> <s>} 
                            {(DQ ($ Id.VSub_DollarName '$DISK'))}
                          )
                      )
                    }
                  spids: [327]
                )
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$SIZE')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CHUNKS)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Slash
                    left: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Minus
                        left: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: {($ Id.VSub_DollarName '$SIZE')}
                            right: {($ Id.VSub_DollarName '$CHUNK_SIZE')}
                          )
                        right: {<Id.Lit_Digits 1>}
                      )
                    right: {($ Id.VSub_DollarName '$CHUNK_SIZE')}
                  )
              )
            }
          spids: [363]
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:i) op:assign_op.Equal rhs:{<0>} spids:[378])]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)]
        )
      body: 
        (command.DoGroup
          children: [
            (C {<progress>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Slash
                      left: 
                        (arith_expr.Binary
                          op_id: Id.Arith_Star
                          left: {($ Id.VSub_DollarName '$i')}
                          right: {<Id.Lit_Digits 100>}
                        )
                      right: {($ Id.VSub_DollarName '$CHUNKS')}
                    )
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$i'))} {<-ge>} 
                  {(DQ ($ Id.VSub_DollarName '$CHUNKS'))} {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow token:<Id.ControlFlow_Break break>)
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [
                    {<dd>}
                    {<Id.Lit_VarLike 'if='> ($ Id.VSub_DollarName '$DISK')}
                    {<Id.Lit_VarLike 'iflag='> <direct>}
                    {<Id.Lit_VarLike 'conv='> <noerror>}
                    {<Id.Lit_VarLike 'bs='> ($ Id.VSub_DollarName '$CHUNK_SIZE')}
                    {<Id.Lit_VarLike 'count='> <1>}
                    {<Id.Lit_VarLike 'skip='> ($ Id.VSub_DollarName '$i')}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [
                    {<grep>}
                    {<--binary-files> <Id.Lit_Equals '='> <text>}
                    {<-U>}
                    {<-F>}
                    {(DQ ($ Id.VSub_DollarName '$STRING'))}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              ]
              negated: F
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<echo>} 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name PIPESTATUS>
                                bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                              )
                            }
                          )
                      )
                    }
                  spids: [472]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dd_status)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$status')})
                              (C {<cut>} {<-f1>} {<-d>} {(SQ <' '>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [485]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:re_status)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_DollarName '$status')})
                              (C {<cut>} {<-f2>} {<-d>} {(SQ <' '>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [505]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$dd_status')} {<-ne>} {<0>} 
                  {<Id.Lit_RBracket ']'>}
                )
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [{<echo>} {(DQ <'dd error'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '>&'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<2>}
                            )
                          ]
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: 
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {($ Id.VSub_DollarName '$dd_status')}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$re_status')} {<-eq>} {<0>} 
                  {<Id.Lit_RBracket ']'>}
                )
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (C {<print>} 
                          {
                            (DQ <'dd if='> ($ Id.VSub_DollarName '$DISK') <' iflag=direct bs='> 
                              ($ Id.VSub_DollarName '$CHUNK_SIZE') <' count=1 skip='> ($ Id.VSub_DollarName '$i') <' > disk_grep.'> ($ Id.VSub_DollarName '$i')
                            )
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:i)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: {($ Id.VSub_DollarName '$i')}
                            right: {<Id.Lit_Digits 1>}
                          )
                      )
                    }
                  spids: [588]
                )
              ]
            )
          ]
        )
    )
    (C {<echo>})
  ]
)