(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _patch
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cur spids:[13])
                  op: Equal
                  spids: [13]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:prev spids:[15])
                  op: Equal
                  spids: [15]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:words spids:[17])
                  op: Equal
                  spids: [17]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cword spids:[19])
                  op: Equal
                  spids: [19]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:split spids:[21])
                  op: Equal
                  spids: [21]
                )
              ]
              spids: [11]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)} {(-s)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [
                    {(-p)}
                    {(--strip)}
                    {(-D)}
                    {(--ifdef)}
                    {(-B)}
                    {(--prefix)}
                    {(-Y)}
                    {(--basename-prefix)}
                    {(-z)}
                    {(--suffix)}
                    {(-g)}
                    {(--get)}
                  ]
                  action: [(command.ControlFlow token:<ControlFlow_Return return>)]
                  spids: [41 66 72 16777215]
                )
                (case_arm
                  pat_list: [{(-F)} {(--fuzz)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[81])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'{0..3}'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [84 100]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [81]
                        )
                      ]
                      spids: [81]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [75 78 108 16777215]
                )
                (case_arm
                  pat_list: [{(-i)} {(--input)}]
                  action: [
                    (C {(_filedir)} {(SQ <'@(?(d)patch|dif?(f))'>)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [111 114 127 16777215]
                )
                (case_arm
                  pat_list: [{(-o)} {(--output)} {(-r)} {(--reject-file)}]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalOr
                              left: 
                                (bool_expr.LogicalNot
                                  child: (bool_expr.WordTest w:{($ VSub_DollarName '$cur')})
                                )
                              right: 
                                (bool_expr.BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_DollarName '$cur')}
                                  right: {(-)}
                                )
                            )
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:COMPREPLY spids:[158])
                              op: Equal
                              rhs: {(word_part.ArrayLiteralPart words:[{(-)}])}
                              spids: [158]
                            )
                          ]
                          spids: [158]
                        )
                      ]
                    )
                    (C {(_filedir)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [130 137 172 16777215]
                )
                (case_arm
                  pat_list: [{(--quoting-style)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[179])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {(SQ <'literal shell shell-always c escape'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [182 200]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [179]
                        )
                      ]
                      spids: [179]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [175 176 208 16777215]
                )
                (case_arm
                  pat_list: [{(-V)} {(--version-control)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[217])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'simple numbered existing'>)} 
                                              {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [220 236]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [217]
                        )
                      ]
                      spids: [217]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [211 214 244 16777215]
                )
                (case_arm
                  pat_list: [{(-d)} {(--directory)}]
                  action: [
                    (C {(_filedir)} {(-d)})
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [247 250 261 16777215]
                )
                (case_arm
                  pat_list: [{(--reject-format)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[268])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'context unified'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [271 287]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [268]
                        )
                      ]
                      spids: [268]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [264 265 295 16777215]
                )
                (case_arm
                  pat_list: [{(--read-only)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[302])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'ignore warn fail'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [305 321]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [302]
                        )
                      ]
                      spids: [302]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [298 299 329 16777215]
                )
              ]
              spids: [34 38 332]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {($ VSub_DollarName '$split')})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$cur')}
                              right: {(-) (Lit_Other '*')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[361])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'$( _parse_help "$1" )'>)} {(--)} 
                                              {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [364 380]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [361]
                        )
                      ]
                      spids: [361]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$COMPREPLY')}
                              right: {(Lit_Other '*') (BoolBinary_GlobEqual '=')}
                            )
                        )
                        (C {(compopt)} {(-o)} {(nospace)})
                      ]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [16777215 358]
                )
              ]
              spids: [16777215 408]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:args spids:[414]) op:Equal spids:[414])]
              spids: [412]
            )
            (C {(_count_args)})
            (command.Case
              to_match: {($ VSub_DollarName '$args')}
              arms: [
                (case_arm
                  pat_list: [{(1)}]
                  action: [(C {(_filedir)})]
                  spids: [427 428 434 16777215]
                )
                (case_arm
                  pat_list: [{(2)}]
                  action: [(C {(_filedir)} {(SQ <'@(?(d)patch|dif?(f))'>)})]
                  spids: [437 438 448 16777215]
                )
              ]
              spids: [420 424 451]
            )
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_patch)} {(patch)})
  ]
)