(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CONF)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/opt/csw/unbound'>)}
          spids: [45]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BASE)
          op: assign_op.Equal
          rhs: {(DQ <'/opt/csw'>)}
          spids: [50]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UC)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$BASE') <'/sbin/unbound-control'>)}
          spids: [59]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FNAME)
          op: assign_op.Equal
          rhs: {(DQ <unbound_cache.dmp>)}
          spids: [65]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BASENAME)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<basename>}))}
          spids: [74]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CAT)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<cat>}))}
          spids: [83]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CUT)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<cut>}))}
          spids: [92]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ECHO)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<echo>}))}
          spids: [101]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:EXPR)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<expr>}))}
          spids: [110]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:GETOPT)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<getopt>}))}
          spids: [119]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ID)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<id>}))}
          spids: [128]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LS)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<which>} {<ls>}))}
          spids: [137]
        )
      ]
    )
    (command.ShFunction
      name: usage_note
      body: 
        (BraceGroup
          children: [
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {
                (DQ <'Usage: '> 
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    child: (C {($ Id.VSub_DollarName '$BASENAME')} {($ Id.VSub_Number '$0')})
                  ) <' [-s] or [-l] or [-r] or [-h] [filename]'>
                )
              }
            )
            (C {($ Id.VSub_DollarName '$ECHO')} {<.>})
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {
                (DQ 
                  <
'l - Load - default mode. Warming up Unbound DNS cache from saved file. cache-ttl must be high value.'
                  >
                )
              }
            )
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {(DQ <'s - Save - save Unbound DNS cache contents to plain file with domain names.'>)}
            )
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {(DQ <'r - Reload - reloadind new cache entries and refresh existing cache'>)}
            )
            (C {($ Id.VSub_DollarName '$ECHO')} {(DQ <'h - this screen.'>)})
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {
                (DQ <'filename - file to save/load dumped cache. If not specified, '> 
                  ($ Id.VSub_DollarName '$CONF') <'/'> ($ Id.VSub_DollarName '$FNAME') <' will be used instead.'>
                )
              }
            )
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {(DQ <'Note: Run without any arguments will be in default mode.'>)}
            )
            (C {($ Id.VSub_DollarName '$ECHO')} 
              {(DQ <'      Also, unbound-control must be configured.'>)}
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: root_check
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} 
                              {
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {($ Id.VSub_DollarName '$ID')})
                                        (C {($ Id.VSub_DollarName '$CUT')} {<-f1>} {<-d> (DQ <' '>)})
                                      ]
                                      negated: F
                                    )
                                )
                              } {<Id.Lit_Equals '='>} {(DQ <'uid=0(root)'>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {(DQ <'ERROR: You must be super-user to run this script.'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [256 288]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_uc
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                              {(DQ ($ Id.VSub_DollarName '$UC'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} {<.>})
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {(DQ <'ERROR: '> ($ Id.VSub_DollarName '$UC') <' not found. Exiting...'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [316 331]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_saved_file
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:filename)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [366]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ ($ Id.VSub_DollarName '$filename'))} {<-a>} {<Id.KW_Bang '!'>} {<-f>} {(DQ ($ Id.VSub_DollarName '$filename'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} {<.>})
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {
                        (DQ <'ERROR: File '> ($ Id.VSub_DollarName '$filename') 
                          <' does not exists. Save it first.'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [370 395]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$CONF') <'/'> 
                                  ($ Id.VSub_DollarName '$FNAME')
                                )
                              } {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} {<.>})
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {
                        (DQ <'ERROR: File '> ($ Id.VSub_DollarName '$CONF') <'/'> 
                          ($ Id.VSub_DollarName '$FNAME') <' does not exists. Save it first.'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [417 434]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: save_cache
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:filename)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [475]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$filename'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {
                        (DQ <'Saving cache in '> ($ Id.VSub_DollarName '$CONF') <'/'> 
                          ($ Id.VSub_DollarName '$FNAME') <...>
                        )
                      }
                    )
                    (command.Simple
                      words: [{($ Id.VSub_DollarName '$UC')} {<dump_cache>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {($ Id.VSub_DollarName '$CONF') <'/'> ($ Id.VSub_DollarName '$FNAME')}
                        )
                      ]
                      do_fork: T
                    )
                    (C {($ Id.VSub_DollarName '$LS')} {<-lh>} 
                      {($ Id.VSub_DollarName '$CONF') <'/'> ($ Id.VSub_DollarName '$FNAME')}
                    )
                  ]
                  spids: [479 492]
                )
              ]
              else_action: [
                (C {($ Id.VSub_DollarName '$ECHO')} 
                  {(DQ <'Saving cache in '> ($ Id.VSub_DollarName '$filename') <...>)}
                )
                (command.Simple
                  words: [{($ Id.VSub_DollarName '$UC')} {<dump_cache>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$filename')}
                    )
                  ]
                  do_fork: T
                )
                (C {($ Id.VSub_DollarName '$LS')} {<-lh>} {($ Id.VSub_DollarName '$filename')})
              ]
            )
            (C {($ Id.VSub_DollarName '$ECHO')} {(DQ <ok>)})
          ]
        )
    )
    (command.ShFunction
      name: load_cache
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:filename)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [574]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$filename'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {($ Id.VSub_DollarName '$ECHO')} 
                      {
                        (DQ <'Loading cache from saved '> ($ Id.VSub_DollarName '$CONF') <'/'> 
                          ($ Id.VSub_DollarName '$FNAME') <...>
                        )
                      }
                    )
                    (C {($ Id.VSub_DollarName '$LS')} {<-lh>} 
                      {($ Id.VSub_DollarName '$CONF') <'/'> ($ Id.VSub_DollarName '$FNAME')}
                    )
                    (C {<check_saved_file>} {($ Id.VSub_DollarName '$filename')})
                    (command.Pipeline
                      children: [
                        (C {($ Id.VSub_DollarName '$CAT')} 
                          {($ Id.VSub_DollarName '$CONF') <'/'> ($ Id.VSub_DollarName '$FNAME')}
                        )
                        (C {($ Id.VSub_DollarName '$UC')} {<load_cache>})
                      ]
                      negated: F
                    )
                  ]
                  spids: [578 591]
                )
              ]
              else_action: [
                (C {($ Id.VSub_DollarName '$ECHO')} 
                  {(DQ <'Loading cache from saved '> ($ Id.VSub_DollarName '$filename') <...>)}
                )
                (C {($ Id.VSub_DollarName '$LS')} {<-lh>} {($ Id.VSub_DollarName '$filename')})
                (C {<check_saved_file>} {($ Id.VSub_DollarName '$filename')})
                (command.Pipeline
                  children: [
                    (C {($ Id.VSub_DollarName '$CAT')} {($ Id.VSub_DollarName '$filename')})
                    (C {($ Id.VSub_DollarName '$UC')} {<load_cache>})
                  ]
                  negated: F
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: reload_cache
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:filename)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [680]
                )
              ]
            )
            (C {<save_cache>} {($ Id.VSub_DollarName '$filename')})
            (C {<load_cache>} {($ Id.VSub_DollarName '$filename')})
          ]
        )
    )
    (C {<root_check>})
    (C {<check_uc>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_Star '$*'))} {<Id.Lit_Equals '='>} 
                      {(DQ <x>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<load_cache>})]
          spids: [721 739]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:arg_list)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Star '$*')}
              spids: [751]
            )
          ]
        )
        (command.AndOr
          ops: [Id.Op_DPipe]
          children: [
            (C {<set>} {<-->} 
              {
                (command_sub
                  left_token: <Id.Left_Backtick '`'>
                  child: 
                    (C {($ Id.VSub_DollarName '$GETOPT')} {<sSlLrRhH> <Id.Lit_Colon ':'>} 
                      {($ Id.VSub_DollarName '$arg_list')}
                    )
                )
              }
            )
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<usage_note>}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
              ]
            )
          ]
        )
        (command.ForEach
          iter_names: [i]
          iterable: (for_iter.Words words:[{($ Id.VSub_DollarName '$arg_list')}])
          body: 
            (command.DoGroup
              children: [
                (command.Case
                  to_match: {($ Id.VSub_DollarName '$i')}
                  arms: [
                    (case_arm
                      pat_list: [{<-s>} {<-S>}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:save)
                              op: assign_op.Equal
                              rhs: {(DQ <1>)}
                              spids: [819]
                            )
                          ]
                        )
                      ]
                      spids: [812 817 823 -1]
                    )
                    (case_arm
                      pat_list: [{<-l>} {<-L>}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:save)
                              op: assign_op.Equal
                              rhs: {(DQ <0>)}
                              spids: [833]
                            )
                          ]
                        )
                      ]
                      spids: [826 831 837 -1]
                    )
                    (case_arm
                      pat_list: [{<-r>} {<-R>}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:save)
                              op: assign_op.Equal
                              rhs: {(DQ <2>)}
                              spids: [847]
                            )
                          ]
                        )
                      ]
                      spids: [840 845 851 -1]
                    )
                    (case_arm
                      pat_list: [
                        {<-h>}
                        {<-H>}
                        {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)}
                      ]
                      action: [(C {<usage_note>})]
                      spids: [854 863 866 -1]
                    )
                    (case_arm
                      pat_list: [{<Id.Lit_Star '*'>}]
                      action: [
                        (C {<shift>})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:file)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$1')}
                              spids: [875]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Break break>
                        )
                      ]
                      spids: [869 870 880 -1]
                    )
                  ]
                )
                (C {<shift>})
              ]
            )
        )
        (C {<shift>} 
          {
            (command_sub
              left_token: <Id.Left_Backtick '`'>
              child: 
                (C {($ Id.VSub_DollarName '$EXPR')} {($ Id.VSub_DollarName '$OPTIND')} {<->} {<1>})
            )
          }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$save'))} 
                      {<Id.Lit_Equals '='>} {(DQ <1>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<save_cache>} {($ Id.VSub_DollarName '$file')})]
          spids: [914 931]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$save'))} 
                      {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<load_cache>} {($ Id.VSub_DollarName '$file')})]
          spids: [938 955]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$save'))} 
                      {<Id.Lit_Equals '='>} {(DQ <2>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<reload_cache>} {($ Id.VSub_DollarName '$file')})]
          spids: [962 979]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)