(CommandList
  children: [
    (AndOr
      children: [
        (FuncDef
          name: _apt_get
          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
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:special) op:Equal spids:[32])
                    (assign_pair lhs:(LhsName name:i) op:Equal spids:[34])
                  ]
                  spids: [30]
                )
                (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: [50 56]
                                  )
                                }
                            )
                          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: [75 80]
                                              )
                                            }
                                          right: {(ExtGlobPart op:<ExtGlob_At '@('> spids:[84 100])}
                                        )
                                    )
                                  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: [109 114]
                                          )
                                        }
                                      spids: [108]
                                    )
                                  ]
                                  spids: [108]
                                )
                              ]
                              spids: [16777215 105]
                            )
                          ]
                          spids: [16777215 117]
                        )
                      ]
                      spids: [68 120]
                    )
                )
                (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: [{(remove)} {(autoremove)} {(purge)}]
                              action: [
                                (If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (Sentence
                                          child: 
                                            (DBracket
                                              expr: 
                                                (BoolUnary
                                                  op_id: BoolUnary_f
                                                  child: {(/etc/debian_version)}
                                                )
                                            )
                                          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 {(_xfunc)} {(dpkg)} 
                                                                  {(_comp_dpkg_installed_packages)} {($ VSub_Name '$cur')}
                                                                )
                                                              ]
                                                            )
                                                          left_token: <Left_CommandSub '$('>
                                                          spids: [174 186]
                                                        )
                                                      }
                                                    ]
                                                  )
                                                }
                                              spids: [171]
                                            )
                                          ]
                                          spids: [171]
                                        )
                                      ]
                                      spids: [16777215 164]
                                    )
                                  ]
                                  else_action: [(C {(_xfunc)} {(rpm)} {(_rpm_installed_packages)})]
                                  spids: [191 205]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [145 150 213 16777215]
                            )
                            (case_arm
                              pat_list: [{(source)}]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:COMPREPLY)
                                      op: Equal
                                      rhs: 
                                        {
                                          (ArrayLiteralPart
                                            words: [
                                              {
                                                (CommandSubPart
                                                  command_list: 
                                                    (CommandList
                                                      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: [237]
                                                            )
                                                          ]
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [223 241]
                                                )
                                              }
                                              {
                                                (CommandSubPart
                                                  command_list: 
                                                    (CommandList
                                                      children: [
                                                        (Pipeline
                                                          children: [
                                                            (C {(apt-cache)} {(dumpavail)})
                                                            (C {(command)} {(grep)} 
                                                              {
                                                                (DQ ('^Source: ') ($ VSub_Name '$cur'))
                                                              }
                                                            )
                                                            (C {(sort)} {(-u)})
                                                            (C {(cut)} {(-f2)} {(-d) (DQ (' '))})
                                                          ]
                                                          negated: False
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [243 279]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [220]
                                    )
                                  ]
                                  spids: [220]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [216 217 289 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: [
                                                        (SimpleCommand
                                                          words: [
                                                            {(apt-cache)}
                                                            {(--no-generate)}
                                                            {(pkgnames)}
                                                            {(DQ ($ VSub_Name '$cur'))}
                                                          ]
                                                          redirects: [
                                                            (Redir
                                                              op_id: Redir_Great
                                                              fd: 2
                                                              arg_word: {(/dev/null)}
                                                              spids: [313]
                                                            )
                                                          ]
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [299 317]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [296]
                                    )
                                  ]
                                  spids: [296]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [292 293 327 16777215]
                            )
                          ]
                          spids: [138 142 330]
                        )
                      ]
                      spids: [16777215 135]
                    )
                  ]
                  spids: [16777215 333]
                )
                (Case
                  to_match: {($ VSub_Name '$prev')}
                  arms: [
                    (case_arm
                      pat_list: [{(-c)} {(--config-file)}]
                      action: [
                        (C {(_filedir)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [344 347 358 16777215]
                    )
                    (case_arm
                      pat_list: [{(-t)} {(--target-release)} {(--default-release)}]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (Pipeline
                                                  children: [
                                                    (C {(apt-cache)} {(policy)})
                                                    (C {(command)} {(grep)} 
                                                      {
                                                        (DQ ('release.o=Debian,a=') 
                                                          ($ VSub_Name '$cur')
                                                        )
                                                      }
                                                    )
                                                    (C {(sed)} {(-e)} 
                                                      {
                                                        (DQ ('s/.*a=') (Lit_Other '\\') ('(') 
                                                          (Lit_Other '\\') ('w*') (Lit_Other '\\') (').*/') (Lit_Other '\\') (1/)
                                                        )
                                                      }
                                                    )
                                                    (SimpleCommand
                                                      words: [{(uniq)}]
                                                      redirects: [
                                                        (Redir
                                                          op_id: Redir_Great
                                                          fd: 2
                                                          arg_word: {(/dev/null)}
                                                          spids: [415]
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                  negated: False
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [372 418]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [369]
                            )
                          ]
                          spids: [369]
                        )
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [361 366 428 16777215]
                    )
                  ]
                  spids: [337 341 431]
                )
                (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 <'-d -f -h -v -m -q -s -y -u -t -b -c -o\n'> 
                                                      <
'            --download-only --fix-broken --help --version --ignore-missing\n'
                                                      > <'            --fix-missing --no-download --quiet --simulate --just-print\n'> 
                                                      <
'            --dry-run --recon --no-act --yes --assume-yes --show-upgraded\n'
                                                      > <'            --only-source --compile --build --ignore-hold --target-release\n'> 
                                                      <
'            --no-upgrade --force-yes --print-uris --purge --reinstall\n'
                                                      > <'            --list-cleanup --default-release --trivial-only --no-remove\n'> 
                                                      <
'            --diff-only --no-install-recommends --tar-only --config-file\n'
                                                      > <'            --option --auto-remove'>
                                                    )
                                                  } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [457 481]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [454]
                            )
                          ]
                          spids: [454]
                        )
                      ]
                      spids: [16777215 451]
                    )
                  ]
                  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 <'update upgrade dselect-upgrade\n'> 
                                                  <
'            dist-upgrade install remove purge source build-dep download\n'
                                                  > <'            changelog check clean autoclean autoremove'>
                                                )
                                              } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [492 510]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [489]
                        )
                      ]
                      spids: [489]
                    )
                  ]
                  spids: [486 515]
                )
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [8]
            )
          spids: [4 7]
        )
        (C {(complete)} {(-F)} {(_apt_get)} {(apt-get)})
      ]
      op_id: Op_DAmp
    )
  ]
)