(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _apt_get
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(lhs_expr.LhsName name:cur) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:prev) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:words) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:cword) op:Equal)
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair lhs:(lhs_expr.LhsName name:special) op:Equal)
                (assign_pair lhs:(lhs_expr.LhsName name:i) op:Equal)
              ]
            )
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Arith_Equal
                  left: (lhs_expr.LhsName name:i)
                  right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (arith_expr.ArithBinary
                  op_id: Arith_Less
                  left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                  right: 
                    (arith_expr.ArithBinary
                      op_id: Arith_Minus
                      left: 
                        (arith_expr.ArithWord
                          w: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name words>
                                prefix_op: VSub_Pound
                                bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                              )
                            }
                        )
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
              update: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(lhs_expr.LhsName name:i))
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: 
                                        {
                                          (word_part.BracedVarSub
                                            token: <VSub_Name words>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithVarRef
                                                    token: <Lit_ArithVarLike i>
                                                  )
                                              )
                                          )
                                        }
                                      right: 
                                        {
                                          (word_part.ExtGlobPart
                                            op: <ExtGlob_At '@('>
                                            arms: [
                                              {(install)}
                                              {(remove)}
                                              {(autoremove)}
                                              {(purge)}
                                              {(source)}
                                              {(build-dep)}
                                              {(download)}
                                              {(changelog)}
                                            ]
                                          )
                                        }
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:special)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.BracedVarSub
                                        token: <VSub_Name words>
                                        bracket_op: 
                                          (bracket_op.ArrayIndex
                                            expr: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>)
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolUnary
                              op_id: BoolUnary_n
                              child: {($ VSub_DollarName '$special')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {($ VSub_DollarName '$special')}
                      arms: [
                        (case_arm
                          pat_list: [{(remove)} {(autoremove)} {(purge)}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.BoolUnary
                                              op_id: BoolUnary_f
                                              child: {(/etc/debian_version)}
                                            )
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                                          op: Equal
                                          rhs: 
                                            {
                                              (word_part.ArrayLiteralPart
                                                words: [
                                                  {
                                                    (word_part.CommandSubPart
                                                      command_list: 
                                                        (command.CommandList
                                                          children: [
                                                            (C {(_xfunc)} {(dpkg)} 
                                                              {(_comp_dpkg_installed_packages)} {($ VSub_DollarName '$cur')}
                                                            )
                                                          ]
                                                        )
                                                      left_token: <Left_CommandSub '$('>
                                                    )
                                                  }
                                                ]
                                              )
                                            }
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                              else_action: [(C {(_xfunc)} {(rpm)} {(_rpm_installed_packages)})]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(source)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.SimpleCommand
                                                      words: [
                                                        {(apt-cache)}
                                                        {(--no-generate)}
                                                        {(pkgnames)}
                                                        {(DQ ($ VSub_DollarName '$cur'))}
                                                      ]
                                                      redirects: [
                                                        (redir.Redir
                                                          op: <Redir_Great '2>'>
                                                          fd: 2
                                                          arg_word: {(/dev/null)}
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                            )
                                          }
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.Pipeline
                                                      children: [
                                                        (C {(apt-cache)} {(dumpavail)})
                                                        (C {(command)} {(grep)} 
                                                          {
                                                            (DQ ('^Source: ') 
                                                              ($ VSub_DollarName '$cur')
                                                            )
                                                          }
                                                        )
                                                        (C {(sort)} {(-u)})
                                                        (C {(cut)} {(-f2)} {(-d) (DQ (' '))})
                                                      ]
                                                      negated: F
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                            )
                                          }
                                        ]
                                      )
                                    }
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(Lit_Other '*')}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (command.SimpleCommand
                                                      words: [
                                                        {(apt-cache)}
                                                        {(--no-generate)}
                                                        {(pkgnames)}
                                                        {(DQ ($ VSub_DollarName '$cur'))}
                                                      ]
                                                      redirects: [
                                                        (redir.Redir
                                                          op: <Redir_Great '2>'>
                                                          fd: 2
                                                          arg_word: {(/dev/null)}
                                                        )
                                                      ]
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                            )
                                          }
                                        ]
                                      )
                                    }
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-c)} {(--config-file)}]
                  action: [
                    (C {(_filedir)})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-t)} {(--target-release)} {(--default-release)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(apt-cache)} {(policy)})
                                                (C {(command)} {(grep)} 
                                                  {
                                                    (DQ ('release.o=Debian,a=') 
                                                      ($ VSub_DollarName '$cur')
                                                    )
                                                  }
                                                )
                                                (C {(sed)} {(-e)} 
                                                  {
                                                    (DQ ('s/.*a=') (Lit_Other '\\') ('(') 
                                                      (Lit_Other '\\') ('w*') (Lit_Other '\\') (').*/') (Lit_Other '\\') (1/)
                                                    )
                                                  }
                                                )
                                                (command.SimpleCommand
                                                  words: [{(uniq)}]
                                                  redirects: [
                                                    (redir.Redir
                                                      op: <Redir_Great '2>'>
                                                      fd: 2
                                                      arg_word: {(/dev/null)}
                                                    )
                                                  ]
                                                )
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {(DQ ($ VSub_DollarName '$cur'))}
                              right: {(-) (Lit_Other '*')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY)
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.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_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                    )
                                  }
                                ]
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY)
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.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_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                )
                              }
                            ]
                          )
                        }
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (C {(complete)} {(-F)} {(_apt_get)} {(apt-get)})
  ]
)