(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _sudo
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(cur)} {(prev)} {(words)} {(cword)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:26)
                )
              ]
            )
            (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: (sh_lhs_expr.Name name:i)
                      right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                    )
                  cond: 
                    (arith_expr.Binary
                      op_id: Id.Arith_LessEqual
                      left: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:i span_id:78))
                      right: 
                        (arith_expr.VarRef
                          token: (Token id:Id.Lit_ArithVarLike val:COMP_CWORD span_id:82)
                        )
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Id.Node_PostDPlus
                      child: (sh_lhs_expr.Name name:i)
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobNEqual
                                          left: 
                                            {
                                              (braced_var_sub
                                                token: 
                                                  (Token
                                                    id: Id.VSub_Name
                                                    val: COMP_WORDS
                                                    span_id: 100
                                                  )
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: 
                                                      (arith_expr.VarRef
                                                        token: 
                                                          (Token
                                                            id: Id.Lit_ArithVarLike
                                                            val: i
                                                            span_id: 102
                                                          )
                                                      )
                                                  )
                                              )
                                            }
                                          right: {(-) (Id.Lit_Other '*')}
                                        )
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:112)
                                )
                              ]
                              action: [
                                (C {(local)} 
                                  {(Id.Lit_VarLike 'PATH=') ($ Id.VSub_DollarName '$PATH') 
                                    (Id.Lit_Other ':') (/sbin) (Id.Lit_Other ':') (/usr/sbin) (Id.Lit_Other ':') (/usr/local/sbin)
                                  }
                                )
                                (C {(local)} 
                                  {(Id.Lit_VarLike 'root_command=') 
                                    (braced_var_sub
                                      token: (Token id:Id.VSub_Name val:COMP_WORDS span_id:133)
                                      bracket_op: 
                                        (bracket_op.ArrayIndex
                                          expr: 
                                            (arith_expr.VarRef
                                              token: (Token id:Id.Lit_ArithVarLike val:i span_id:135)
                                            )
                                        )
                                    )
                                  }
                                )
                                (C {(_command_offset)} {($ Id.VSub_DollarName '$i')})
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Return val:return span_id:145)
                                )
                              ]
                              spids: [95 114]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: 
                                            {
                                              (braced_var_sub
                                                token: 
                                                  (Token
                                                    id: Id.VSub_Name
                                                    val: COMP_WORDS
                                                    span_id: 156
                                                  )
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: 
                                                      (arith_expr.VarRef
                                                        token: 
                                                          (Token
                                                            id: Id.Lit_ArithVarLike
                                                            val: i
                                                            span_id: 158
                                                          )
                                                      )
                                                  )
                                              )
                                            }
                                          right: {(Id.BoolUnary_e -e)}
                                        )
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:167)
                                )
                              ]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:mode)
                                      op: assign_op.Equal
                                      rhs: {(edit)}
                                      spids: [172]
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Break val:break span_id:176)
                                )
                              ]
                              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: (Token id:Id.VSub_Name val:COMP_WORDS span_id:185)
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: 
                                              (arith_expr.VarRef
                                                token: 
                                                  (Token
                                                    id: Id.Lit_ArithVarLike
                                                    val: i
                                                    span_id: 187
                                                  )
                                              )
                                          )
                                      )
                                    }
                                  right: {(-) (Id.Lit_Other '[') (uUgCp) (Id.Lit_Other ']')}
                                )
                            )
                            (command.DParen
                              child: 
                                (arith_expr.UnaryAssign
                                  op_id: Id.Node_PostDPlus
                                  child: (sh_lhs_expr.Name name: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: (Token id:Id.Op_LParen val:'(' span_id:229)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:231)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-u)} {(--)} 
                                              {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [228]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:248)
                    )
                  ]
                  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: (Token id:Id.Op_LParen val:'(' span_id:259)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:261)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-g)} {(--)} 
                                              {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [258]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:278)
                    )
                  ]
                  spids: [254 255 281 -1]
                )
                (case_arm
                  pat_list: [{(-C)} {(-p)}]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:294)
                    )
                  ]
                  spids: [284 287 297 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (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: (Token id:Id.Op_Semi val:';' span_id:318)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:324)
                                words: [
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:326)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ 
                                                  (Token
                                                    id: Id.Lit_Chars
                                                    val: 
'-A -b -C -E -e -g -H -h -i -K -k -L -l -ll\n'
                                                    span_id: 333
                                                  ) (Token id:Id.Lit_Chars val:'            -n -P -p -S -s -U -u -V -v' span_id:334)
                                                )
                                              } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [323]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:348)
                    )
                  ]
                  spids: [304 320]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$mode')}
                              right: {(edit)}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:365)
                    )
                  ]
                  action: [(C {(_filedir)})]
                  spids: [354 367]
                )
              ]
            )
          ]
        )
    )
    (C {(complete)} {(-F)} {(_sudo)} {(sudo)} {(sudoedit)})
  ]
)