(command.CommandList
  children: [
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:BADYEAR) op:Equal rhs:{(no)})]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HWCLOCKACCESS) op:Equal rhs:{(yes)})]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HWCLOCKPARS) op:Equal rhs:(word.Empty))]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HCTOSYS_DEVICE) op:Equal rhs:{(rtc0)})]
    )
    (C {(unset)} {(TZ)})
    (command.FuncDef
      name: hwclocksh
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-x)} {(/sbin/hwclock)} {(Lit_RBracket ']')})
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-r)} {(/etc/default/rcS)} {(Lit_RBracket ']')})
                (C {(.)} {(/etc/default/rcS)})
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-r)} {(/etc/default/hwclock)} 
                  {(Lit_RBracket ']')}
                )
                (C {(.)} {(/etc/default/hwclock)})
              ]
            )
            (C {(.)} {(/lib/lsb/init-functions)})
            (command.FuncDef
              name: verbose_log_action_msg
              body: 
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} 
                              {(Lit_Other '=')} {(no)} {(Lit_RBracket ']')}
                            )
                            (C {(log_action_msg)} {(DQ ($ VSub_At '$@'))})
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$BADYEAR'))}
              arms: [
                (case_arm
                  pat_list: [{(no)} {(DQ )}]
                  action: [
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:BADYEAR) op:Equal rhs:{(DQ )})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(yes)}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:BADYEAR)
                          op: Equal
                          rhs: {(DQ (--badyear))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (command.Sentence
                      child: 
                        (C {(log_action_msg)} 
                          {
                            (DQ ('unknown BADYEAR setting: ') 
                              (word_part.EscapedLiteral
                                token: <Lit_EscapedChar '\\"'>
                              ) ($ VSub_DollarName '$BADYEAR') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>)
                            )
                          }
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(start)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Op_DAmp Op_DAmp]
                                  children: [
                                    (C {(Lit_LBracket '[')} {(-w)} {(/etc)} {(Lit_RBracket ']')})
                                    (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {(/etc/adjtime)} 
                                      {(Lit_RBracket ']')}
                                    )
                                    (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-e)} {(/etc/adjtime)} 
                                      {(Lit_RBracket ']')}
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(printf)}
                                {
                                  (DQ ('0.0 0 0.0') (Lit_Other '\\') (n0) (Lit_Other '\\') (nUTC) 
                                    (Lit_Other '\\') (n)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(/etc/adjtime)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Op_DPipe]
                                  children: [
                                    (C {(Lit_LBracket '[')} {(-d)} {(/run/udev)} {(Lit_RBracket ']')})
                                    (C {(Lit_LBracket '[')} {(-d)} {(/dev/.udev)} {(Lit_RBracket ']')})
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$HWCLOCKACCESS'))} 
                                  {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_RBracket ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(log_action_msg)} {(DQ ('Setting the system clock'))})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {(sed)} {(SQ <'3!d'>)} {(/etc/adjtime)})
                                            (C {(grep)} {(-q)} {(SQ <'^UTC$'>)})
                                          ]
                                          negated: F
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (command.Assignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:UTC)
                                          op: Equal
                                          rhs: {(DQ (--utc))}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                              else_action: [
                                (command.Assignment
                                  pairs: [(assign_pair lhs:(lhs_expr.LhsName name:UTC) op:Equal rhs:(word.Empty))]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(/sbin/hwclock)} 
                                          {(--rtc) (Lit_Other '=') (/dev/) 
                                            ($ VSub_DollarName '$HCTOSYS_DEVICE')
                                          } {(--hctosys)} {($ VSub_DollarName '$HWCLOCKPARS')} {($ VSub_DollarName '$BADYEAR')}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C {(verbose_log_action_msg)} 
                                      {
                                        (DQ ('System Clock set to: ') 
                                          (word_part.CommandSub
                                            left_token: <Left_Backtick '`'>
                                            command_list: 
                                              (command.CommandList
                                                children: [(C {(date)} {($ VSub_DollarName '$UTC')})]
                                              )
                                          )
                                        )
                                      }
                                    )
                                  ]
                                )
                              ]
                              else_action: [
                                (C {(log_warning_msg)} 
                                  {
                                    (DQ ('Unable to set System Clock to: ') 
                                      (word_part.CommandSub
                                        left_token: <Left_Backtick '`'>
                                        command_list: 
                                          (command.CommandList
                                            children: [(C {(date)} {($ VSub_DollarName '$UTC')})]
                                          )
                                      )
                                    )
                                  }
                                )
                              ]
                            )
                          ]
                        )
                      ]
                      else_action: [(C {(verbose_log_action_msg)} {(DQ ('Not setting System Clock'))})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(stop)} {(restart)} {(reload)} {(force-reload)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$HWCLOCKACCESS'))} 
                                  {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_RBracket ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(log_action_msg)} {(DQ ('Saving the system clock'))})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {(/sbin/hwclock)} 
                                          {(--rtc) (Lit_Other '=') (/dev/) 
                                            ($ VSub_DollarName '$HCTOSYS_DEVICE')
                                          } {(--systohc)} {($ VSub_DollarName '$HWCLOCKPARS')} {($ VSub_DollarName '$BADYEAR')}
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C {(verbose_log_action_msg)} 
                                      {
                                        (DQ ('Hardware Clock updated to ') 
                                          (word_part.CommandSub
                                            left_token: <Left_Backtick '`'>
                                            command_list: 
                                              (command.CommandList
                                                children: [(C {(date)})]
                                              )
                                          )
                                        )
                                      }
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                      else_action: [(C {(verbose_log_action_msg)} {(DQ ('Not saving System Clock'))})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(show)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$HWCLOCKACCESS'))} 
                                  {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_RBracket ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(/sbin/hwclock)} 
                              {(--rtc) (Lit_Other '=') (/dev/) ($ VSub_DollarName '$HCTOSYS_DEVICE')} {(--show)} {($ VSub_DollarName '$HWCLOCKPARS')} {($ VSub_DollarName '$BADYEAR')}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (C {(log_success_msg)} 
                      {(DQ ('Usage: hwclock.sh {start|stop|reload|force-reload|show}'))}
                    )
                    (C {(log_success_msg)} 
                      {(DQ ('       start sets kernel (system) clock from hardware (RTC) clock'))}
                    )
                    (C {(log_success_msg)} 
                      {
                        (DQ 
                          (
'       stop and reload set hardware (RTC) clock from kernel (system) clock'
                          )
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {(hwclocksh)} {(DQ ($ VSub_At '$@'))})
  ]
)