(command.AndOr
  children: [
    (command.ShFunction
      name_tok: <_invoke_rc_d>
      name: _invoke_rc_d
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<cur>} {<prev>} {<words>} {<cword>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <_init_completion>
                  more_env: []
                  words: [{<_init_completion>}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<sysvdir>} {<services>} {<options>} {<valid_options>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.DBracket
                  left: <Id.KW_DLeftBracket '[['>
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_d child:{<'/etc/rc.d/init.d'>})
                  right: <Id.Lit_DRightBracket ']]'>
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'sysvdir='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'sysvdir='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sysvdir='> name:sysvdir)
                      op: assign_op.Equal
                      rhs: {<'/etc/rc.d/init.d'>}
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'sysvdir='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'sysvdir='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sysvdir='> name:sysvdir)
                      op: assign_op.Equal
                      rhs: {<'/etc/init.d'>}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DPipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'services='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'services='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'services='> name:services)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (ShArrayLiteral
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Simple
                                  blame_tok: <printf>
                                  more_env: []
                                  words: [
                                    {<printf>}
                                    {(SQ <'%s '>)}
                                    {($ Id.VSub_DollarName sysvdir) <'/'> 
                                      (word_part.ExtGlob
                                        op: <Id.ExtGlob_Bang '!('>
                                        arms: [
                                          {<README> <Id.Lit_Other '*'>}
                                          {<Id.Lit_Other '*'> <.sh>}
                                          {($ Id.VSub_DollarName _backup_glob)}
                                        ]
                                        right: <Id.Right_ExtGlob _>
                                      )
                                    }
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              right: <Id.Eof_RParen _>
                            )
                          }
                        ]
                        right: <Id.Right_ShArrayLiteral _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'services='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'services='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'services='> name:services)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (ShArrayLiteral
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Name services>
                              var_name: services
                              bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VOp1_Pound '#'>
                                  arg_word: {($ Id.VSub_DollarName sysvdir) <Id.Lit_Slash '/'>}
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                          }
                        ]
                        right: <Id.Right_ShArrayLiteral _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'options='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'options='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'options='> name:options)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (ShArrayLiteral
                        left: <Id.Op_LParen _>
                        words: [
                          {<--help>}
                          {<--quiet>}
                          {<--force>}
                          {<--try-anyway>}
                          {<--disclose-deny>}
                          {<--query>}
                          {<--no-fallback>}
                        ]
                        right: <Id.Right_ShArrayLiteral _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.LogicalOr
                                  left: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_DollarName cword)}
                                      right: {<1>}
                                    )
                                  right: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {(DQ ($ Id.VSub_DollarName prev))}
                                      right: {<--> <Id.Lit_Other '*'>}
                                    )
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'valid_options='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'valid_options='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'valid_options='>
                              name: valid_options
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (ShArrayLiteral
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <tr>
                                              more_env: []
                                              words: [
                                                {<tr>}
                                                {(DQ <' '>)}
                                                {(DQ <Id.Lit_BadBackslash '\\'> <n>)}
                                              ]
                                              redirects: [
                                                (Redir
                                                  op: <Id.Redir_TLess '<<<'>
                                                  loc: (redir_loc.Fd fd:0)
                                                  arg: 
                                                    {
                                                      (DQ 
                                                        (BracedVarSub
                                                          left: <Id.Left_DollarBrace '${'>
                                                          token: <Id.VSub_Name words>
                                                          var_name: words
                                                          bracket_op: 
                                                            (bracket_op.WholeArray
                                                              op_id: Id.Lit_At
                                                            )
                                                          right: <Id.Right_DollarBrace '}'>
                                                        ) <' '> 
                                                        (BracedVarSub
                                                          left: <Id.Left_DollarBrace '${'>
                                                          token: <Id.VSub_Name options>
                                                          var_name: options
                                                          bracket_op: 
                                                            (bracket_op.WholeArray
                                                              op_id: Id.Lit_At
                                                            )
                                                          right: <Id.Right_DollarBrace '}'>
                                                        )
                                                      )
                                                    }
                                                )
                                              ]
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <sed>
                                              more_env: []
                                              words: [
                                                {<sed>}
                                                {<-ne>}
                                                {
                                                  (DQ <'/'> 
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <sed>
                                                          more_env: []
                                                          words: [
                                                            {<sed>}
                                                            {
                                                              (DQ <'s/ /'> 
                                                                (word_part.EscapedLiteral
                                                                  token: <Id.Lit_EscapedChar '\\\\'>
                                                                  ch: '\\'
                                                                ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'|/g'>
                                                              )
                                                            }
                                                          ]
                                                          redirects: [
                                                            (Redir
                                                              op: <Id.Redir_TLess '<<<'>
                                                              loc: (redir_loc.Fd fd:0)
                                                              arg: 
                                                                {
                                                                  (DQ 
                                                                    (BracedVarSub
                                                                      left: 
                                                                        <Id.Left_DollarBrace '${'>
                                                                      token: <Id.VSub_Name options>
                                                                      var_name: options
                                                                      bracket_op: 
                                                                        (bracket_op.WholeArray
                                                                          op_id: Id.Lit_At
                                                                        )
                                                                      right: 
                                                                        <Id.Right_DollarBrace '}'>
                                                                    )
                                                                  )
                                                                }
                                                            )
                                                          ]
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    ) <'/p'>
                                                  )
                                                }
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <sort>
                                              more_env: []
                                              words: [{<sort>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <uniq>
                                              more_env: []
                                              words: [{<uniq>} {<-u>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  }
                                ]
                                right: <Id.Right_ShArrayLiteral _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'COMPREPLY='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'COMPREPLY='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COMPREPLY='> name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (ShArrayLiteral
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          blame_tok: <compgen>
                                          more_env: []
                                          words: [
                                            {<compgen>}
                                            {<-W>}
                                            {(SQ <'${valid_options[@]} ${services[@]}'>)}
                                            {<-->}
                                            {(DQ ($ Id.VSub_DollarName cur))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  }
                                ]
                                right: <Id.Right_ShArrayLiteral _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [137 166]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_x
                                  child: 
                                    {($ Id.VSub_DollarName sysvdir) <'/'> ($ Id.VSub_DollarName prev)}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'COMPREPLY='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'COMPREPLY='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COMPREPLY='> name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (ShArrayLiteral
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          blame_tok: <compgen>
                                          more_env: []
                                          words: [
                                            {<compgen>}
                                            {<-W>}
                                            {
                                              (SQ <'`sed -e "y/|/ /" \\\n'> 
                                                <
'            -ne "s/^.*Usage:[ ]*[^ ]*[ ]*{*\\([^}\\"]*\\).*$/\\1/p" \\\n'
                                                > <'            $sysvdir/$prev`'>
                                              )
                                            }
                                            {<-->}
                                            {(DQ ($ Id.VSub_DollarName cur))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  }
                                ]
                                right: <Id.Right_ShArrayLiteral _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [282 295]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'COMPREPLY='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'COMPREPLY='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COMPREPLY='> name:COMPREPLY)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (ShArrayLiteral
                            left: <Id.Op_LParen _>
                            words: []
                            right: <Id.Right_ShArrayLiteral _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <complete>
      more_env: []
      words: [{<complete>} {<-F>} {<_invoke_rc_d>} {<invoke-rc.d>}]
      redirects: []
      do_fork: T
    )
  ]
  ops: [<Id.Op_DAmp _>]
)