(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _sudo
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (C {<local>} {<i>} {<Id.Lit_VarLike 'mode='> <normal>})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Number '$1')}
                      right: {<Id.Lit_Other '*'> <sudoedit>}
                    )
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:mode)
                      op: assign_op.Equal
                      rhs: {<edit>}
                      spids: [51]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_DollarName '$mode')}
                      right: {<normal>}
                    )
                )
                (command.ForExpr
                  init: 
                    (arith_expr.BinaryAssign
                      op_id: Id.Arith_Equal
                      left: <Id.Lit_ArithVarLike i>
                      right: {<Id.Lit_Digits 1>}
                    )
                  cond: 
                    (arith_expr.Binary
                      op_id: Id.Arith_LessEqual
                      left: <Id.Lit_ArithVarLike i>
                      right: <Id.Lit_ArithVarLike COMP_CWORD>
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Id.Node_PostDPlus
                      child: <Id.Lit_ArithVarLike i>
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobNEqual
                                              left: 
                                                {
                                                  (braced_var_sub
                                                    token: <Id.VSub_Name COMP_WORDS>
                                                    bracket_op: 
                                                      (bracket_op.ArrayIndex
                                                        expr: <Id.Lit_ArithVarLike i>
                                                      )
                                                  )
                                                }
                                              right: {<-> <Id.Lit_Other '*'>}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<local>} 
                                  {<Id.Lit_VarLike 'PATH='> ($ Id.VSub_DollarName '$PATH') 
                                    <Id.Lit_Colon ':'> <'/sbin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/usr/local/sbin'>
                                  }
                                )
                                (C {<local>} 
                                  {<Id.Lit_VarLike 'root_command='> 
                                    (braced_var_sub
                                      token: <Id.VSub_Name COMP_WORDS>
                                      bracket_op: (bracket_op.ArrayIndex expr:<Id.Lit_ArithVarLike i>)
                                    )
                                  }
                                )
                                (C {<_command_offset>} {($ Id.VSub_DollarName '$i')})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                )
                              ]
                              spids: [95 114]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: 
                                                {
                                                  (braced_var_sub
                                                    token: <Id.VSub_Name COMP_WORDS>
                                                    bracket_op: 
                                                      (bracket_op.ArrayIndex
                                                        expr: <Id.Lit_ArithVarLike i>
                                                      )
                                                  )
                                                }
                                              right: {<Id.BoolUnary_e -e>}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:mode)
                                      op: assign_op.Equal
                                      rhs: {<edit>}
                                      spids: [172]
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Break break>
                                )
                              ]
                              spids: [151 169]
                            )
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name COMP_WORDS>
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: <Id.Lit_ArithVarLike i>
                                          )
                                      )
                                    }
                                  right: {<-> <Id.Lit_Other '['> <uUgCp> <Id.Lit_Other ']'>}
                                )
                            )
                            (command.DParen
                              child: 
                                (arith_expr.UnaryAssign
                                  op_id: Id.Node_PostDPlus
                                  child: <Id.Lit_ArithVarLike i>
                                )
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$prev'))}
              arms: [
                (case_arm
                  pat_list: [{<-u>} {<-U>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-u>} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))})
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [228]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [222 225 251 -1]
                )
                (case_arm
                  pat_list: [{<-g>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-g>} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))})
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [258]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [254 255 281 -1]
                )
                (case_arm
                  pat_list: [{<-C>} {<-p>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [284 287 297 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                                  right: {<-> <Id.Lit_Other '*'>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} 
                                          {
                                            (SQ <'-A -b -C -E -e -g -H -h -i -K -k -L -l -ll\n'> 
                                              <'            -n -P -p -S -s -U -u -V -v'>
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [323]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [304 320]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$mode')}
                                  right: {<edit>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<_filedir>})]
                  spids: [354 367]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_sudo>} {<sudo>} {<sudoedit>})
  ]
)