(CommandList
  children: [
    (AndOr
      children: [
        (FuncDef
          name: _upgradepkg
          body: 
            (BraceGroup
              children: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:cur) op:Equal spids:[13])
                    (assign_pair lhs:(LhsName name:prev) op:Equal spids:[15])
                    (assign_pair lhs:(LhsName name:words) op:Equal spids:[17])
                    (assign_pair lhs:(LhsName name:cword) op:Equal spids:[19])
                  ]
                  spids: [11]
                )
                (AndOr
                  children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
                  op_id: Op_DPipe
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: {(-) (Lit_Other '*')}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (C {(compgen)} {(-W)} 
                                                  {
                                                    (SQ <'--dry-run --install-new --reinstall\n'> 
                                                      <'            --verbose'>
                                                    )
                                                  } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [52 69]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [49]
                            )
                          ]
                          spids: [49]
                        )
                        (ControlFlow token:<ControlFlow_Return return>)
                      ]
                      spids: [16777215 46]
                    )
                  ]
                  spids: [16777215 77]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: 
                                    {(Lit_Other '?') (Lit_Other '*') (Lit_Other '%') (Lit_Other '*')}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:prev)
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      token: <VSub_Name cur>
                                      suffix_op: 
                                        (StringUnary
                                          op_id: VOp1_DPercent
                                          arg_word: 
                                            {('?(') 
                                              (EscapedLiteralPart
                                                token: <Lit_EscapedChar '\\\\'>
                                              ) (')') (Lit_Percent '%') ('*')
                                            }
                                        )
                                      spids: [104 112]
                                    )
                                  )
                                }
                              spids: [102]
                            )
                          ]
                          spids: [102]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:cur)
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      token: <VSub_Name cur>
                                      suffix_op: 
                                        (StringUnary
                                          op_id: VOp1_Pound
                                          arg_word: {('*') (Lit_Percent '%')}
                                        )
                                      spids: [118 123]
                                    )
                                  )
                                }
                              spids: [116]
                            )
                          ]
                          spids: [116]
                        )
                        (Assignment
                          keyword: Assign_Local
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:nofiles)
                              op: Equal
                              spids: [129]
                            )
                            (assign_pair
                              lhs: (LhsName name:IFS)
                              op: Equal
                              rhs: {(SQ <Lit_EscapedChar '\\n'>)}
                              spids: [131]
                            )
                          ]
                          spids: [127]
                        )
                        (C {(compopt)} {(-o)} {(filenames)})
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (C {(compgen)} {(-P)} {(DQ ($ VSub_Name '$prev') ('%'))} 
                                                  {(-f)} {(-X)} {(DQ ('!*.@(t[bgxl]z)'))} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [147 172]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [144]
                            )
                          ]
                          spids: [144]
                        )
                        (AndOr
                          children: [
                            (DBracket
                              expr: (WordTest w:{($ VSub_Name '$COMPREPLY')})
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:nofiles)
                                  op: Equal
                                  rhs: {(1)}
                                  spids: [185]
                                )
                              ]
                              spids: [185]
                            )
                          ]
                          op_id: Op_DPipe
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: PlusEqual
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (C {(compgen)} {(-P)} {(DQ ($ VSub_Name '$prev') ('%'))} 
                                                  {(-S)} {(SQ </>)} {(-d)} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [192 217]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [189]
                            )
                          ]
                          spids: [189]
                        )
                        (AndOr
                          children: [
                            (DBracket
                              expr: (WordTest w:{($ VSub_Name '$nofiles')})
                            )
                            (C {(compopt)} {(-o)} {(nospace)})
                          ]
                          op_id: Op_DAmp
                        )
                        (ControlFlow token:<ControlFlow_Return return>)
                      ]
                      spids: [16777215 99]
                    )
                  ]
                  spids: [16777215 240]
                )
                (C {(_filedir)} {(SQ <'t[bglx]z'>)})
              ]
              spids: [8]
            )
          spids: [4 7]
        )
        (C {(complete)} {(-F)} {(_upgradepkg)} {(upgradepkg)})
      ]
      op_id: Op_DAmp
    )
  ]
)