(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.ShFunction
          name: display_help
          body: 
            (BraceGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                              {(DQ (${ Id.VSub_Name PROGDIR) <'/doc/help-index'>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<cat>} {(${ Id.VSub_Name PROGDIR) <'/doc/help-index'>})]
                      spids: [96 112]
                    )
                  ]
                  else_action: [
                    (C {<echo>} 
                      {(DQ <'Error: '> (${ Id.VSub_Name PROGDIR) <'/doc/help-index not found'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: display_command_help
          body: 
            (BraceGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} {(DQ <'Error: No command specified to display help for'>)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [158 171]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                              {(DQ (${ Id.VSub_Name PROGDIR) <'/doc/help-'> (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<cat>} {(${ Id.VSub_Name PROGDIR) <'/doc/help-'> (${ Id.VSub_Number 1)})
                      ]
                      spids: [191 210]
                    )
                  ]
                  else_action: [
                    (C {<echo>} 
                      {
                        (DQ <'Error: '> (${ Id.VSub_Name PROGDIR) <'/doc/help-'> (${ Id.VSub_Number 1) 
                          <' not found'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: convert_byte_to_megabyte
          body: 
            (BraceGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} {(DQ <'Error: No bytes specified!'>)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [263 278]
                    )
                  ]
                )
                (C {<expr>} {<-e>} {(${ Id.VSub_Number 1)} {<'/'>} {<1048576>})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: convert_blocks_to_megabyte
          body: 
            (BraceGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} {(DQ <'Error: No blocks specified!'>)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [323 339]
                    )
                  ]
                )
                (C {<expr>} {<-e>} {(${ Id.VSub_Number 1)} {<'/'>} {<2048>})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: strip_white_space
          body: 
            (BraceGroup
              children: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} {(DQ <'Error: No value setup to strip whitespace from!'>)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [384 399]
                    )
                  ]
                )
                (C {<export>} 
                  {<Id.Lit_VarLike 'VAL='> 
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))})
                            (C {<tr>} {<-d>} {(SQ <' '>)})
                          ]
                          negated: F
                        )
                    )
                  }
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: exit_err
          body: 
            (BraceGroup
              children: [
                (C {<echo>} {(DQ <'EXITERROR: '> ($ Id.VSub_Number '$1'))})
                (command.Simple
                  words: [{<echo>} {(DQ <'EXITERROR: '> (${ Id.VSub_Number 1))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$LOGOUT')}
                    )
                  ]
                  do_fork: T
                )
                (C {<unmount_all_filesystems_failure>})
                (C {<echo>} {(DQ <'For more details see log file: '> ($ Id.VSub_DollarName '$LOGOUT'))})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: rc_nohalt
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:CMD)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [522]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name CMD))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'Error: missing argument in rc_nohalt()'>)})]
                      spids: [529 544]
                    )
                  ]
                )
                (command.Simple
                  words: [{<echo>} {(DQ <'Running: '> (${ Id.VSub_Name CMD))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{(${ Id.VSub_Name CMD)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                    (redir
                      op: <Id.Redir_DGreat '2>>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: rc_halt
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:CMD)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [602]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name CMD))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'Error: missing argument in rc_halt()'>)})]
                      spids: [609 624]
                    )
                  ]
                )
                (command.Simple
                  words: [{<echo>} {(DQ <'Running: '> (${ Id.VSub_Name CMD))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{<eval>} {(${ Id.VSub_Name CMD)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                    (redir
                      op: <Id.Redir_DGreat '2>>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:STATUS)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [670]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name STATUS))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<exit_err>} 
                          {(DQ <'Error '> (${ Id.VSub_Name STATUS) <': '> (${ Id.VSub_Name CMD))}
                        )
                      ]
                      spids: [676 696]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: rc_halt_echo
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:CMD)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [729]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name CMD))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'Error: missing argument in rc_halt_echo()'>)})]
                      spids: [736 751]
                    )
                  ]
                )
                (command.Simple
                  words: [{<echo>} {(DQ <'Running: '> (${ Id.VSub_Name CMD))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [{(${ Id.VSub_Name CMD)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<tee>} {<-a>} {(${ Id.VSub_Name LOGOUT)})
                  ]
                  negated: F
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:STATUS)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [799]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$STATUS'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<exit_err>} 
                          {
                            (DQ <'Error '> (${ Id.VSub_Name STATUS) <': '> ($ Id.VSub_DollarName '$CMD'))
                          }
                        )
                      ]
                      spids: [805 823]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: rc_nohalt_echo
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:CMD)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [855]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name CMD))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'Error: missing argument in rc_nohalt_echo()'>)})]
                      spids: [862 877]
                    )
                  ]
                )
                (command.Simple
                  words: [{<echo>} {(DQ <'Running: '> (${ Id.VSub_Name CMD))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [{(${ Id.VSub_Name CMD)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<tee>} {<-a>} {(${ Id.VSub_Name LOGOUT)})
                  ]
                  negated: F
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: echo_log
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:STR)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [939]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name STR))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'Error: missing argument in echo_log()'>)})]
                      spids: [946 961]
                    )
                  ]
                )
                (command.Pipeline
                  children: [
                    (C {<echo>} {(DQ (${ Id.VSub_Name STR))})
                    (C {<tee>} {<-a>} {(${ Id.VSub_Name LOGOUT)})
                  ]
                  negated: F
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.ShFunction
      name: is_num
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<expr>} {($ Id.VSub_Number '$1')} {<Id.Lit_Other '+'>} {<1>}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
        )
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: fetch_file
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:FETCHFILE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [1038]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:FETCHOUTFILE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$2'))}
                      spids: [1044]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:EXITFAILED)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$3'))}
                      spids: [1050]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:EXITFILE)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name TMPDIR) <'/.fetchExit'>)}
                      spids: [1057]
                    )
                  ]
                )
                (command.Simple
                  words: [{<rm>} {(${ Id.VSub_Name FETCHOUTFILE)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:SIZE)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (word_part.ArithSub
                            anode: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Slash
                                left: 
                                  {
                                    (command_sub
                                      left_token: <Id.Left_Backtick '`'>
                                      child: (C {<fetch>} {<-s>} {(DQ (${ Id.VSub_Name FETCHFILE))})
                                    )
                                  }
                                right: {<Id.Lit_Digits 1024>}
                              )
                          )
                        }
                      spids: [1081]
                    )
                  ]
                )
                (C {<echo>} {(DQ <'FETCH: '> (${ Id.VSub_Name FETCHFILE))})
                (command.Simple
                  words: [{<echo>} {(DQ <'FETCH: '> (${ Id.VSub_Name FETCHOUTFILE))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name LOGOUT)}
                    )
                  ]
                  do_fork: T
                )
                (command.Sentence
                  child: 
                    (command.Subshell
                      child: 
                        (command.CommandList
                          children: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  words: [
                                    {<fetch>}
                                    {<-o>}
                                    {(${ Id.VSub_Name FETCHOUTFILE)}
                                    {(DQ (${ Id.VSub_Name FETCHFILE))}
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Simple
                              words: [{<echo>} {(DQ ($ Id.VSub_QMark '$?'))}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {(${ Id.VSub_Name EXITFILE)}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                        )
                    )
                  terminator: <Id.Op_Amp _>
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:PID)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Bang '$!'))}
                      spids: [1173]
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:z)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [1182]
                            )
                          ]
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {<-e>} 
                                      {(DQ (${ Id.VSub_Name FETCHOUTFILE))} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:DSIZE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Id.Left_Backtick '`'>
                                            child: 
                                              (command.Pipeline
                                                children: [
                                                  (C {<du>} {<-k>} {(${ Id.VSub_Name FETCHOUTFILE)})
                                                  (C {<tr>} {<-d>} {(SQ <'\\t'>)})
                                                  (C {<cut>} {<-d>} {(SQ <'/'>)} {<-f>} {<1>})
                                                ]
                                                negated: F
                                              )
                                          )
                                        }
                                      spids: [1208]
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (C {<Id.Lit_LBracket '['>} 
                                                  {
                                                    (command_sub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (C {<is_num>} 
                                                          {(DQ ($ Id.VSub_DollarName '$DSIZE'))}
                                                        )
                                                    )
                                                  } {<Id.Lit_RBracket ']'>}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.If
                                          arms: [
                                            (if_arm
                                              cond: 
                                                (condition.Shell
                                                  commands: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<Id.Lit_LBracket '['>} 
                                                          {($ Id.VSub_DollarName '$SIZE')} {<-lt>} {($ Id.VSub_DollarName '$DSIZE')} {<Id.Lit_RBracket ']'>}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                )
                                              action: [
                                                (command.Sentence
                                                  child: 
                                                    (command.ShAssignment
                                                      pairs: [
                                                        (assign_pair
                                                          lhs: (sh_lhs_expr.Name name:DSIZE)
                                                          op: assign_op.Equal
                                                          rhs: {(DQ ($ Id.VSub_DollarName '$SIZE'))}
                                                          spids: [1283]
                                                        )
                                                      ]
                                                    )
                                                  terminator: <Id.Op_Semi _>
                                                )
                                              ]
                                              spids: [1267 1281]
                                            )
                                          ]
                                        )
                                        (C {<echo>} 
                                          {
                                            (DQ <'SIZE: '> (${ Id.VSub_Name SIZE) <' DOWNLOADED: '> 
                                              (${ Id.VSub_Name DSIZE)
                                            )
                                          }
                                        )
                                        (command.Simple
                                          words: [
                                            {<echo>}
                                            {
                                              (DQ <'SIZE: '> (${ Id.VSub_Name SIZE) <' DOWNLOADED: '> 
                                                (${ Id.VSub_Name DSIZE)
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '>>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {(${ Id.VSub_Name LOGOUT)}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                      spids: [1248 1264]
                                    )
                                  ]
                                )
                              ]
                              spids: [1190 1205]
                            )
                          ]
                        )
                        (command.Simple
                          words: [{<ps>} {<-p>} {(${ Id.VSub_Name PID)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              action: [
                                (command.Sentence
                                  child: (command.ControlFlow token:<Id.ControlFlow_Break break>)
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              spids: [1352 1365]
                            )
                          ]
                        )
                        (C {<sleep>} {<2>})
                      ]
                    )
                )
                (C {<echo>} {(DQ <FETCHDONE>)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:EXIT)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: (C {<cat>} {(${ Id.VSub_Name EXITFILE)})
                            )
                          )
                        }
                      spids: [1393]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name EXIT))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<-a>} {(DQ ($ Id.VSub_DollarName '$EXITFAILED'))} {<Id.Lit_Equals '='>} {(DQ <1>)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<exit_err>} 
                          {(DQ <'Error: Failed to download '> (${ Id.VSub_Name FETCHFILE))}
                        )
                      ]
                      spids: [1407 1439]
                    )
                  ]
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {($ Id.VSub_DollarName '$EXIT')}
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: get_zpool_name
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:DEVICE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [1475]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:BASENAME)
                      op: assign_op.Equal
                      rhs: {(DQ <tank>)}
                      spids: [1486]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                                  {(DQ (${ Id.VSub_Name TMPDIR) <'/.zpools'>)} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [(C {<mkdir>} {<-p>} {(${ Id.VSub_Name TMPDIR) <'/.zpools'>})]
                      spids: [1493 1512]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-e>} 
                                  {
                                    (DQ (${ Id.VSub_Name TMPDIR) <'/.zpools/'> (${ Id.VSub_Name DEVICE))
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<cat>} {(${ Id.VSub_Name TMPDIR) <'/.zpools/'> (${ Id.VSub_Name DEVICE)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [1529 1549]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NUM)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (C {<ls>} {(${ Id.VSub_Name TMPDIR) <'/.zpools/'>})
                                      (C {<wc>} {<-l>})
                                      (C {<sed>} {(SQ <'s| ||g'>)})
                                    ]
                                    negated: F
                                  )
                              )
                            }
                          spids: [1575]
                        )
                      ]
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: (condition.Shell commands:[(C {<Id.Lit_Colon ':'>})])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:NEWNAME)
                                  op: assign_op.Equal
                                  rhs: {(DQ (${ Id.VSub_Name BASENAME) (${ Id.VSub_Name NUM))}
                                  spids: [1615]
                                )
                              ]
                            )
                            (command.Pipeline
                              children: [
                                (C {<zpool>} {<list>})
                                (C {<grep>} {<-qw>} {(DQ (${ Id.VSub_Name NEWNAME))})
                              ]
                              negated: F
                            )
                            (C {<local>} {<Id.Lit_VarLike 'chk1='> ($ Id.VSub_QMark '$?')})
                            (command.Pipeline
                              children: [
                                (C {<zpool>} {<Id.KW_Import import>})
                                (C {<grep>} {<-qw>} {(DQ (${ Id.VSub_Name NEWNAME))})
                              ]
                              negated: F
                            )
                            (C {<local>} {<Id.Lit_VarLike 'chk2='> ($ Id.VSub_QMark '$?')})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$chk1')} 
                                              {<-eq>} {<1>} {<-a>} {($ Id.VSub_DollarName '$chk2')} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.Sentence
                                      child: (command.ControlFlow token:<Id.ControlFlow_Break break>)
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  spids: [1672 1694]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:NUM)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: <Id.Lit_ArithVarLike NUM>
                                            right: {<Id.Lit_Digits 1>}
                                          )
                                      )
                                    }
                                  spids: [1704]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (C {<mkdir>} {<-p>} 
                      {(${ Id.VSub_Name TMPDIR) <'/.zpools/'> 
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: (C {<dirname>} {($ Id.VSub_DollarName '$DEVICE')})
                        )
                      }
                    )
                    (command.Simple
                      words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$NEWNAME'))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(${ Id.VSub_Name TMPDIR) <'/.zpools/'> (${ Id.VSub_Name DEVICE)}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<echo>} {(DQ (${ Id.VSub_Name NEWNAME))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.ShFunction
      name: iscompressed
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<FILE>})
            (C {<local>} {<RES>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [1793]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RES)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [1799]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<echo>} {(DQ (${ Id.VSub_Name FILE))})
                            (command.Simple
                              words: [{<grep>} {<-qiE>} {(SQ <'\\.(Z|lzo|lzw|lzma|gz|bz2|xz|zip)$'>)}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '2>&'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<1>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:RES)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [1833]
                        )
                      ]
                    )
                  ]
                  spids: [1804 1830]
                )
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {(${ Id.VSub_Name RES)}
            )
          ]
        )
    )
    (command.ShFunction
      name: get_compression_type
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<FILE>})
            (C {<local>} {<SUFFIX>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [1868]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SUFFIX)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {(DQ (${ Id.VSub_Name FILE))})
                              (C {<sed>} {<-E>} {(SQ <'s|^(.+)\\.(.+)$|\\2|'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1874]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:VAL)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [1903]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SUFFIX)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {(DQ (${ Id.VSub_Name SUFFIX))})
                              (C {<tr>} {<A-Z>} {<a-z>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [1908]
                )
              ]
            )
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name SUFFIX))}
              arms: [
                (case_arm
                  pat_list: [{<z>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <lzw>)}
                          spids: [1944]
                        )
                      ]
                    )
                  ]
                  spids: [1941 1942 1949 -1]
                )
                (case_arm
                  pat_list: [{<lzo>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <lzo>)}
                          spids: [1955]
                        )
                      ]
                    )
                  ]
                  spids: [1952 1953 1960 -1]
                )
                (case_arm
                  pat_list: [{<lzw>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <lzw>)}
                          spids: [1966]
                        )
                      ]
                    )
                  ]
                  spids: [1963 1964 1971 -1]
                )
                (case_arm
                  pat_list: [{<lzma>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <lzma>)}
                          spids: [1977]
                        )
                      ]
                    )
                  ]
                  spids: [1974 1975 1982 -1]
                )
                (case_arm
                  pat_list: [{<gz>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <gzip>)}
                          spids: [1988]
                        )
                      ]
                    )
                  ]
                  spids: [1985 1986 1993 -1]
                )
                (case_arm
                  pat_list: [{<bz2>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <bzip2>)}
                          spids: [1999]
                        )
                      ]
                    )
                  ]
                  spids: [1996 1997 2004 -1]
                )
                (case_arm
                  pat_list: [{<xz>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <xz>)}
                          spids: [2010]
                        )
                      ]
                    )
                  ]
                  spids: [2007 2008 2015 -1]
                )
                (case_arm
                  pat_list: [{<zip>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:VAL)
                          op: assign_op.Equal
                          rhs: {(DQ <zip>)}
                          spids: [2021]
                        )
                      ]
                    )
                  ]
                  spids: [2018 2019 2026 -1]
                )
              ]
            )
            (C {<export>} {<VAL>})
          ]
        )
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: write_image
          body: 
            (BraceGroup
              children: [
                (C {<local>} {<DEVICE_FILE>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [2053]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:DEVICE_FILE)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$2'))}
                      spids: [2059]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name IMAGE_FILE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'ERROR: Image file not specified!'>)})]
                      spids: [2066 2081]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name DEVICE_FILE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<exit_err>} {(DQ <'ERROR: Device file not specified!'>)})]
                      spids: [2096 2111]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                              {(DQ (${ Id.VSub_Name IMAGE_FILE))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<exit_err>} 
                          {(DQ <'ERROR: \''> (${ Id.VSub_Name IMAGE_FILE) <'\' does not exist!'>)}
                        )
                      ]
                      spids: [2126 2143]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:DEVICE_FILE)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: <Id.VSub_Name DEVICE_FILE>
                              suffix_op: 
                                (suffix_op.Unary
                                  tok: <Id.VOp1_Pound '#'>
                                  arg_word: {<Id.Lit_Slash '/'> <dev> <Id.Lit_Slash '/'>}
                                )
                            )
                          )
                        }
                      spids: [2161]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:DEVICE_FILE)
                      op: assign_op.Equal
                      rhs: {(DQ <'/dev/'> (${ Id.VSub_Name DEVICE_FILE))}
                      spids: [2173]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-c>} 
                              {(DQ (${ Id.VSub_Name DEVICE_FILE))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<exit_err>} 
                          {
                            (DQ <'ERROR: \''> (${ Id.VSub_Name DEVICE_FILE) 
                              <'\' is not a character device!'>
                            )
                          }
                        )
                      ]
                      spids: [2184 2201]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [(C {<iscompressed>} {(DQ (${ Id.VSub_Name IMAGE_FILE))})]
                        )
                      action: [
                        (C {<local>} {<COMPRESSION>})
                        (C {<get_compression_type>} {(DQ (${ Id.VSub_Name IMAGE_FILE))})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:COMPRESSION)
                              op: assign_op.Equal
                              rhs: {(DQ (${ Id.VSub_Name VAL))}
                              spids: [2248]
                            )
                          ]
                        )
                        (command.Case
                          to_match: {(DQ (${ Id.VSub_Name COMPRESSION))}
                          arms: [
                            (case_arm
                              pat_list: [{<lzw>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'uncompress '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.Z>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2286]
                                    )
                                  ]
                                )
                              ]
                              spids: [2268 2269 2296 -1]
                            )
                            (case_arm
                              pat_list: [{<lzo>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'lzop -d '> ($ Id.VSub_DollarName '$IMAGE_') 
                                      <'{FILE} -c | dd of='> (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.lzo>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2316]
                                    )
                                  ]
                                )
                              ]
                              spids: [2300 2301 2326 -1]
                            )
                            (case_arm
                              pat_list: [{<lzma>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'lzma -d '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.lzma>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2348]
                                    )
                                  ]
                                )
                              ]
                              spids: [2330 2331 2358 -1]
                            )
                            (case_arm
                              pat_list: [{<gzip>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'gunzip '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.gz>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2380]
                                    )
                                  ]
                                )
                              ]
                              spids: [2362 2363 2390 -1]
                            )
                            (case_arm
                              pat_list: [{<bzip2>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'bunzip2 '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.bz2>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2412]
                                    )
                                  ]
                                )
                              ]
                              spids: [2394 2395 2422 -1]
                            )
                            (case_arm
                              pat_list: [{<xz>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'xz -d '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.xz>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2444]
                                    )
                                  ]
                                )
                              ]
                              spids: [2426 2427 2454 -1]
                            )
                            (case_arm
                              pat_list: [{<zip>}]
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'unzip '> (${ Id.VSub_Name IMAGE_FILE) <' -c | dd of='> 
                                      (${ Id.VSub_Name DEVICE_FILE)
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IMAGE_FILE)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: <Id.VSub_Name IMAGE_FILE>
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  tok: <Id.VOp1_Percent '%'>
                                                  arg_word: {<.zip>}
                                                )
                                            )
                                          )
                                        }
                                      spids: [2476]
                                    )
                                  ]
                                )
                              ]
                              spids: [2458 2459 2486 -1]
                            )
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'>}]
                              action: [
                                (C {<exit_err>} 
                                  {
                                    (DQ <'ERROR: '> (${ Id.VSub_Name COMPRESSION) 
                                      <' compression is not supported'>
                                    )
                                  }
                                )
                              ]
                              spids: [2490 2491 2506 -1]
                            )
                          ]
                        )
                      ]
                      spids: [2219 2230]
                    )
                  ]
                  else_action: [
                    (C {<rc_halt>} 
                      {
                        (DQ <'dd if='> (${ Id.VSub_Name IMAGE_FILE) <' of='> 
                          (${ Id.VSub_Name DEVICE_FILE)
                        )
                      }
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: install_fresh
          body: 
            (BraceGroup
              children: [
                (C {<setup_disk_slice>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name ROOTIMAGE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<setup_disk_label>})
                        (C {<setup_filesystems>})
                        (C {<mount_all_filesystems>})
                        (C {<init_extraction>})
                        (C {<install_components>})
                        (C {<install_packages>})
                        (C {<run_localize>})
                        (C {<save_networking_install>})
                        (C {<setup_users>})
                        (C {<run_final_cleanup>})
                        (C {<run_commands>})
                        (C {<unmount_all_filesystems>})
                      ]
                      spids: [2556 2571]
                    )
                  ]
                )
                (C {<echo_log>} {(DQ <'Installation finished!'>)})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: install_extractonly
          body: 
            (BraceGroup
              children: [
                (C {<init_extraction>})
                (C {<install_components>})
                (C {<install_packages>})
                (C {<run_localize>})
                (C {<save_networking_install>})
                (C {<setup_users>})
                (C {<run_commands>})
                (C {<setup_hostname>})
                (C {<set_root_pw>})
                (C {<echo_log>} {(DQ <'Installation finished!'>)})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: install_image
          body: 
            (BraceGroup
              children: [(C {<init_extraction>}) (C {<echo_log>} {(DQ <'Installation finished!'>)})]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: install_upgrade
          body: 
            (BraceGroup
              children: [
                (C {<mount_upgrade>})
                (C {<init_extraction>})
                (C {<run_localize>})
                (C {<run_commands>})
                (C {<merge_old_configs>})
                (C {<install_components>})
                (C {<install_packages>})
                (C {<unmount_upgrade>})
                (C {<echo_log>} {(DQ <'Upgrade finished!'>)})
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
  ]
)