(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {<'/usr/sbin'>} {<-o>} {<Id.KW_Bang '!'>} 
          {<-d>} {<'/usr/bin'>} {<Id.Lit_RBracket ']'>}
        )
        (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SVBOOT='> name:SVBOOT)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/svboot'>}
          spids: [100]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SVCS='> name:SVCS)
          op: assign_op.Equal
          rhs: {<'/usr/bin/svcs'>}
          spids: [103]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DSCFG_DEPEND_NOCHK='> name:DSCFG_DEPEND_NOCHK)
          op: assign_op.Equal
          rhs: {(DQ <'/tmp/.dscfgadm_pid'>)}
          spids: [106]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OS_MINOR='> name:OS_MINOR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<'/usr/bin/uname'>} {<-r>})
                      (C {<'/usr/bin/cut'>} {<-d>} {(SQ <.>)} {<-f2>})
                    ]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [111]
        )
      ]
      redirects: []
    )
    (C {<.>} {<'/lib/svc/share/smf_include.sh'>})
    (command.ShFunction
      name: do_smf_depends
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [155]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [159]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} {<-ge>} {<11>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [164 177]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [pid]
                      iterable: 
                        (for_iter.Words
                          words: [
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<pgrep>} {<dscfgadm>})
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          ]
                        )
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (C {<grep>} {<-c>} {($ Id.VSub_DollarName pid)} 
                                                  {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)}
                                                )
                                              right: <Id.Backtick_Right '`'>
                                            )
                                          } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<0>}
                                    )
                                  ]
                                  spids: [217 240]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                  ]
                  spids: [185 196]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<ps>} {<-ef>})
                                    (C {<grep>} {<preremove>})
                                    (C {<grep>} {<-c>} {<SUNWspsvu>})
                                  ]
                                  negated: F
                                  stderr_indices: []
                                )
                              right: <Id.Backtick_Right '`'>
                            )
                          } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [254 287]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [
                                          {($ Id.VSub_DollarName SVCS)}
                                          {<-o>}
                                          {<STATE>}
                                          {<-D>}
                                          {($ Id.VSub_Number 1)}
                                        ]
                                        redirects: [
                                          (redir
                                            op: <Id.Redir_DGreat '2>>'>
                                            loc: (redir_loc.Fd fd:2)
                                            arg: {<'/dev/null'>}
                                          )
                                        ]
                                        more_env: []
                                        do_fork: T
                                      )
                                      (C {<grep>} {(DQ <'^online'>)})
                                      (C {<wc>} {<-l>})
                                    ]
                                    negated: F
                                    stderr_indices: []
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [317]
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} 
                                          {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'Waiting for '> ($ Id.VSub_Number 1) 
                                          <' dependents to be \'offline\''>
                                        )
                                      }
                                    )
                                    (command.Pipeline
                                      children: [
                                        (command.Simple
                                          words: [
                                            {($ Id.VSub_DollarName SVCS)}
                                            {<-D>}
                                            {($ Id.VSub_Number 1)}
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '2>>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          more_env: []
                                          do_fork: T
                                        )
                                        (C {<grep>} {(DQ <'^online'>)})
                                      ]
                                      negated: F
                                      stderr_indices: []
                                    )
                                  ]
                                  spids: [374 387]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} 
                                          {<-eq>} {<60>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'Error: Failed waiting for '> ($ Id.VSub_Number 1) 
                                          <' dependents to be \'offline\''>
                                        )
                                      }
                                    )
                                    (command.Pipeline
                                      children: [
                                        (command.Simple
                                          words: [
                                            {($ Id.VSub_DollarName SVCS)}
                                            {<-D>}
                                            {($ Id.VSub_Number 1)}
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '2>>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          more_env: []
                                          do_fork: T
                                        )
                                        (C {<grep>} {(DQ <'^online'>)})
                                      ]
                                      negated: F
                                      stderr_indices: []
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {($ Id.VSub_DollarName SMF_EXIT_ERR_FATAL)}
                                    )
                                  ]
                                  spids: [429 442]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (C {<sleep>} {<5>})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: 
                                          (C {<expr>} {($ Id.VSub_DollarName times)} 
                                            {<Id.Lit_Other '+'>} {<1>}
                                          )
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [494]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [350 363]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-x>} {($ Id.VSub_DollarName SVBOOT)} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ ($ Id.VSub_Number 0) <': cannot find '> ($ Id.VSub_DollarName SVBOOT))})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName SMF_EXIT_MON_OFFLINE)}
            )
          ]
          spids: [525 537]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number 1))}
      arms: [
        (case_arm
          pat_list: [{(SQ <start>)}]
          action: [(C {($ Id.VSub_DollarName SVBOOT)} {<-r>})]
          spids: [564 567 576 -1]
        )
        (case_arm
          pat_list: [{(SQ <stop>)}]
          action: [
            (C {<do_smf_depends>} {(DQ <'system/nws_sv'>)})
            (C {($ Id.VSub_DollarName SVBOOT)} {<-s>})
          ]
          spids: [579 582 599 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number 0) <' { start | stop }'>)})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName SMF_EXIT_MON_OFFLINE)}
            )
          ]
          spids: [602 603 620 -1]
        )
      ]
      redirects: []
    )
    (command.ControlFlow
      token: <Id.ControlFlow_Exit exit>
      arg_word: {($ Id.VSub_DollarName SMF_EXIT_OK)}
    )
  ]
)