(CommandList
  children: [
    (AndOr
      children: [
        (FuncDef
          name: _removepkg
          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 <'-copy -keep -preserve -warn'>)} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [51 67]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [48]
                            )
                          ]
                          spids: [48]
                        )
                        (ControlFlow token:<ControlFlow_Return return>)
                      ]
                      spids: [16777215 45]
                    )
                  ]
                  spids: [16777215 75]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$cur'))}
                                  right: {(Lit_Other '*') (/) (Lit_Other '*')}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [(C {(_filedir)}) (ControlFlow token:<ControlFlow_Return return>)]
                      spids: [16777215 96]
                    )
                  ]
                  spids: [16777215 105]
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:root)
                      op: Equal
                      rhs: 
                        {
                          (BracedVarSub
                            token: <VSub_Name ROOT>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /)})
                            spids: [112 116]
                          )
                        }
                      spids: [111]
                    )
                  ]
                  spids: [109]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:COMPREPLY)
                      op: Equal
                      rhs: 
                        {
                          (ArrayLiteralPart
                            words: [
                              {
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (Sentence
                                          child: 
                                            (AndOr
                                              children: [
                                                (SimpleCommand
                                                  words: [
                                                    {(cd)}
                                                    {(DQ ($ VSub_Name '$root') (/var/log/packages))}
                                                  ]
                                                  redirects: [
                                                    (Redir
                                                      op_id: Redir_Great
                                                      fd: 2
                                                      arg_word: {(/dev/null)}
                                                      spids: [131]
                                                    )
                                                  ]
                                                )
                                                (ControlFlow
                                                  token: <ControlFlow_Return return>
                                                  arg_word: {(1)}
                                                )
                                              ]
                                              op_id: Op_DPipe
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                        (C {(compgen)} {(-f)} {(--)} {(DQ ($ VSub_Name '$cur'))})
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [122 154]
                                )
                              }
                            ]
                          )
                        }
                      spids: [119]
                    )
                  ]
                  spids: [119]
                )
              ]
              spids: [8]
            )
          spids: [4 7]
        )
        (C {(complete)} {(-F)} {(_removepkg)} {(removepkg)})
      ]
      op_id: Op_DAmp
    )
  ]
)