(CommandList
  children: [
    (FuncDef
      name: _apt_cache_packages
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(apt-cache)} {(--no-generate)} {(pkgnames)} {(DQ ($ VSub_Name '$cur'))}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[24])]
            )
          ]
          spids: [11]
        )
      spids: [7 10]
    )
    (FuncDef
      name: _apt_cache_sources
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (C {(apt-cache)} {(dumpavail)})
                (C {(command)} {(grep)} {(DQ ('^Source: ') ($ VSub_Number '$1'))})
                (C {(cut)} {(-f2)} {(-d) (DQ (' '))})
                (C {(sort)} {(-u)})
              ]
              negated: False
            )
          ]
          spids: [38]
        )
      spids: [34 37]
    )
    (FuncDef
      name: _apt_cache_src_packages
      body: 
        (BraceGroup
          children: [
            (C {(compgen)} {(-W)} {(SQ <'$( _apt_cache_sources "$cur" )'>)} {(--)} 
              {(DQ ($ VSub_Name '$cur'))}
            )
          ]
          spids: [83]
        )
      spids: [79 82]
    )
    (AndOr
      children: [
        (FuncDef
          name: _apt_cache
          body: 
            (BraceGroup
              children: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:cur) op:Equal spids:[112])
                    (assign_pair lhs:(LhsName name:prev) op:Equal spids:[114])
                    (assign_pair lhs:(LhsName name:words) op:Equal spids:[116])
                    (assign_pair lhs:(LhsName name:cword) op:Equal spids:[118])
                  ]
                  spids: [110]
                )
                (AndOr
                  children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
                  op_id: Op_DPipe
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:special) op:Equal spids:[131])
                    (assign_pair lhs:(LhsName name:i) op:Equal spids:[133])
                  ]
                  spids: [129]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobNEqual
                                  left: {($ VSub_Name '$cur')}
                                  right: {(show)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (ForExpr
                          init: 
                            (BinaryAssign
                              op_id: Arith_Equal
                              left: (LhsName name:i)
                              right: (ArithWord w:{(Lit_Digits 0)})
                            )
                          cond: 
                            (ArithBinary
                              op_id: Arith_Less
                              left: (ArithVarRef name:i)
                              right: 
                                (ArithBinary
                                  op_id: Arith_Minus
                                  left: 
                                    (ArithWord
                                      w: 
                                        {
                                          (BracedVarSub
                                            token: <VSub_Name words>
                                            prefix_op: VSub_Pound
                                            bracket_op: (WholeArray op_id:Lit_At)
                                            spids: [165 171]
                                          )
                                        }
                                    )
                                  right: (ArithWord w:{(Lit_Digits 1)})
                                )
                            )
                          update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
                          body: 
                            (DoGroup
                              children: [
                                (If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (Sentence
                                          child: 
                                            (DBracket
                                              expr: 
                                                (BoolBinary
                                                  op_id: BoolBinary_GlobDEqual
                                                  left: 
                                                    {
                                                      (BracedVarSub
                                                        token: <VSub_Name words>
                                                        bracket_op: 
                                                          (ArrayIndex
                                                            expr: (ArithVarRef name:i)
                                                          )
                                                        spids: [190 195]
                                                      )
                                                    }
                                                  right: 
                                                    {
                                                      (ExtGlobPart
                                                        op: <ExtGlob_At '@('>
                                                        spids: [199 219]
                                                      )
                                                    }
                                                )
                                            )
                                          terminator: <Op_Semi ';'>
                                        )
                                      ]
                                      action: [
                                        (Assignment
                                          keyword: Assign_None
                                          pairs: [
                                            (assign_pair
                                              lhs: (LhsName name:special)
                                              op: Equal
                                              rhs: 
                                                {
                                                  (BracedVarSub
                                                    token: <VSub_Name words>
                                                    bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                                    spids: [228 233]
                                                  )
                                                }
                                              spids: [227]
                                            )
                                          ]
                                          spids: [227]
                                        )
                                      ]
                                      spids: [16777215 224]
                                    )
                                  ]
                                  spids: [16777215 236]
                                )
                              ]
                              spids: [183 239]
                            )
                        )
                      ]
                      spids: [16777215 149]
                    )
                  ]
                  spids: [16777215 242]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: (BoolUnary op_id:BoolUnary_n child:{($ VSub_Name '$special')})
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Case
                          to_match: {($ VSub_Name '$special')}
                          arms: [
                            (case_arm
                              pat_list: [{(add)}]
                              action: [
                                (C {(_filedir)})
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [268 269 280 16777215]
                            )
                            (case_arm
                              pat_list: [{(showsrc)}]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (ArrayLiteralPart
                                            words: [
                                              {
                                                (CommandSubPart
                                                  command_list: 
                                                    (CommandList
                                                      children: [
                                                        (C {(_apt_cache_sources)} 
                                                          {(DQ ($ VSub_Name '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [291 299]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [288]
                                    )
                                  ]
                                  spids: [288]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [284 285 309 16777215]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (ArrayLiteralPart
                                            words: [
                                              {
                                                (CommandSubPart
                                                  command_list: 
                                                    (CommandList
                                                      children: [(C {(_apt_cache_packages)})]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [320 324]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [317]
                                    )
                                  ]
                                  spids: [317]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [313 314 334 16777215]
                            )
                          ]
                          spids: [261 265 338]
                        )
                      ]
                      spids: [16777215 258]
                    )
                  ]
                  spids: [16777215 341]
                )
                (Case
                  to_match: {($ VSub_Name '$prev')}
                  arms: [
                    (case_arm
                      pat_list: [{(-c)} {(-p)} {(-s)} {(--config-file)} {(--pkg-cache)} {(--src-cache)}]
                      action: [
                        (C {(_filedir)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [353 364 375 16777215]
                    )
                    (case_arm
                      pat_list: [{(search)}]
                      action: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (DBracket
                                      expr: 
                                        (BoolBinary
                                          op_id: BoolBinary_GlobNEqual
                                          left: {(DQ ($ VSub_Name '$cur'))}
                                          right: {(-) (Lit_Other '*')}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                              spids: [16777215 398]
                            )
                          ]
                          spids: [16777215 406]
                        )
                      ]
                      spids: [378 379 409 16777215]
                    )
                  ]
                  spids: [346 350 412]
                )
                (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 <'-h -v -p -s -q -i -f -a -g -c -o --help\n'> 
                                                      <
'                --version --pkg-cache --src-cache --quiet --important --full\n'
                                                      > <'                --all-versions --no-all-versions --generate --no-generate\n'> 
                                                      <
'                --names-only --all-names --recurse --config-file --option\n'
                                                      > <'                --installed'>
                                                    )
                                                  } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [439 459]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [436]
                            )
                          ]
                          spids: [436]
                        )
                      ]
                      spids: [16777215 432]
                    )
                  ]
                  else_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 <'add gencaches show showpkg showsrc stats\n'> 
                                                  <
'                dump dumpavail unmet search search depends rdepends pkgnames\n'
                                                  > <'                dotty xvcg policy madison'>
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [471 489]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [468]
                        )
                      ]
                      spids: [468]
                    )
                  ]
                  spids: [464 495]
                )
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [107]
            )
          spids: [103 106]
        )
        (C {(complete)} {(-F)} {(_apt_cache)} {(apt-cache)})
      ]
      op_id: Op_DAmp
    )
  ]
)