(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _complete
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(lhs_expr.LhsName name:cur) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:prev) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:words) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:cword) op:Equal)
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-o)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'bashdefault default dirnames filenames\n'> 
                                                  <'                nospace plusdirs'>
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-A)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'alias arrayvar binding builtin command\n'> 
                                                  <
'                directory disabled enabled export file function group helptopic\n'
                                                  > <'                hostname job keyword running service setopt shopt signal\n'> 
                                                  <'                stopped user variable'>
                                                )
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-C)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-A)} {(command)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-F)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-A)} {(KW_Function function)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-p)} {(-r)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(complete)} {(-p)})
                                                (C {(sed)} {(-e)} {(SQ <'s|.* ||'>)})
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'${COMPREPLY[@]}'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {(DQ ($ VSub_DollarName '$cur'))}
                              right: {(-) (Lit_Other '*')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:opts)
                          op: Equal
                          rhs: {(DQ ('-a -b -c -d -e -f -g -j -k -o -s -u -v -A -G -W -P -S -X'))}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobNEqual
                              left: {($ VSub_Number '$1')}
                              right: {(compgen)}
                            )
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:opts)
                              op: PlusEqual
                              rhs: {(DQ (' -F -C'))}
                            )
                          ]
                        )
                      ]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$opts'))} 
                                              {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(compgen)} {(-A)} {(command)} {(--)} 
                                          {(DQ ($ VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                )
                              }
                            ]
                          )
                        }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {(complete)} {(-F)} {(_complete)} {(compgen)} {(complete)})
  ]
)