(CommandList
  children: [
    (FuncDef
      name: _installed_alternatives
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:admindir) op:Equal spids:[13])]
              spids: [11]
            )
            (ForEach
              iter_name: i
              iter_words: [{(alternatives)} {(dpkg/alternatives)} {(rpm/alternatives)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      children: [
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_d child:{(/var/lib/) ($ VSub_Name '$i')})
                        )
                        (AndOr
                          children: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:admindir)
                                  op: Equal
                                  rhs: {(/var/lib/) ($ VSub_Name '$i')}
                                  spids: [47]
                                )
                              ]
                              spids: [47]
                            )
                            (ControlFlow token:<ControlFlow_Break break>)
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  spids: [33 56]
                )
              spids: [25 31]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 1)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: (ArithVarRef name:cword)
                )
              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: 
                                        {
                                          (DQ 
                                            (BracedVarSub
                                              token: <VSub_Name words>
                                              bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                              spids: [90 95]
                                            )
                                          )
                                        }
                                      right: {(--admindir)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:admindir)
                                  op: Equal
                                  rhs: 
                                    {
                                      (BracedVarSub
                                        token: <VSub_Name words>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: 
                                              (ArithBinary
                                                op_id: Arith_Plus
                                                left: (ArithVarRef name:i)
                                                right: (ArithWord w:{(Lit_Digits 1)})
                                              )
                                          )
                                        spids: [109 116]
                                      )
                                    }
                                  spids: [108]
                                )
                              ]
                              spids: [108]
                            )
                            (ControlFlow token:<ControlFlow_Break break>)
                          ]
                          spids: [16777215 105]
                        )
                      ]
                      spids: [16777215 122]
                    )
                  ]
                  spids: [82 125]
                )
            )
            (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 <'$( command ls $admindir )'>)} {(--)} 
                                      {(DQ ($ VSub_Name '$cur'))}
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [131 147]
                            )
                          }
                        ]
                      )
                    }
                  spids: [128]
                )
              ]
              spids: [128]
            )
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (AndOr
      children: [
        (FuncDef
          name: _update_alternatives
          body: 
            (BraceGroup
              children: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:cur) op:Equal spids:[163])
                    (assign_pair lhs:(LhsName name:prev) op:Equal spids:[165])
                    (assign_pair lhs:(LhsName name:words) op:Equal spids:[167])
                    (assign_pair lhs:(LhsName name:cword) op:Equal spids:[169])
                  ]
                  spids: [161]
                )
                (AndOr
                  children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
                  op_id: Op_DPipe
                )
                (Case
                  to_match: {($ VSub_Name '$prev')}
                  arms: [
                    (case_arm
                      pat_list: [{(--altdir)} {(--admindir)}]
                      action: [
                        (C {(_filedir)} {(-d)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [187 190 203 16777215]
                    )
                    (case_arm
                      pat_list: [{(--help)} {(--usage)} {(--version)}]
                      action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                      spids: [206 211 219 16777215]
                    )
                  ]
                  spids: [180 184 222]
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:mode) op:Equal spids:[228])
                    (assign_pair lhs:(LhsName name:args) op:Equal spids:[230])
                    (assign_pair lhs:(LhsName name:i) op:Equal spids:[232])
                  ]
                  spids: [226]
                )
                (ForExpr
                  init: 
                    (BinaryAssign
                      op_id: Arith_Equal
                      left: (LhsName name:i)
                      right: (ArithWord w:{(Lit_Digits 1)})
                    )
                  cond: 
                    (ArithBinary
                      op_id: Arith_Less
                      left: (ArithVarRef name:i)
                      right: (ArithVarRef name:cword)
                    )
                  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: 
                                            {
                                              (DQ 
                                                (BracedVarSub
                                                  token: <VSub_Name words>
                                                  bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                                  spids: [271 276]
                                                )
                                              )
                                            }
                                          right: 
                                            {(--) (ExtGlobPart op:<ExtGlob_At '@('> spids:[282 296])}
                                        )
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:mode)
                                      op: Equal
                                      rhs: 
                                        {
                                          (BracedVarSub
                                            token: <VSub_Name words>
                                            bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                            spids: [305 310]
                                          )
                                        }
                                      spids: [304]
                                    )
                                  ]
                                  spids: [304]
                                )
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:args)
                                      op: Equal
                                      rhs: 
                                        {
                                          (ArithSubPart
                                            anode: 
                                              (ArithBinary
                                                op_id: Arith_Minus
                                                left: (ArithWord w:{($ VSub_Name '$cword')})
                                                right: (ArithVarRef name:i)
                                              )
                                            spids: [314 321]
                                          )
                                        }
                                      spids: [313]
                                    )
                                  ]
                                  spids: [313]
                                )
                                (ControlFlow
                                  token: <ControlFlow_Break break>
                                )
                              ]
                              spids: [16777215 301]
                            )
                          ]
                          spids: [16777215 327]
                        )
                      ]
                      spids: [263 330]
                    )
                )
                (Case
                  to_match: {($ VSub_Name '$mode')}
                  arms: [
                    (case_arm
                      pat_list: [{(--install)}]
                      action: [
                        (Case
                          to_match: {($ VSub_Name '$args')}
                          arms: [
                            (case_arm
                              pat_list: [{(1)} {(3)}]
                              action: [(C {(_filedir)})]
                              spids: [352 355 361 16777215]
                            )
                            (case_arm
                              pat_list: [{(2)}]
                              action: [(C {(_installed_alternatives)})]
                              spids: [364 365 371 16777215]
                            )
                            (case_arm
                              pat_list: [{(4)}]
                              spids: [374 375 382 16777215]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [
                                (Case
                                  to_match: 
                                    {
                                      (ArithSubPart
                                        anode: 
                                          (ArithBinary
                                            op_id: Arith_Percent
                                            left: (ArithVarRef name:args)
                                            right: (ArithWord w:{(Lit_Digits 4)})
                                          )
                                        spids: [391 398]
                                      )
                                    }
                                  arms: [
                                    (case_arm
                                      pat_list: [{(0)} {(2)}]
                                      action: [(C {(_filedir)})]
                                      spids: [403 406 412 16777215]
                                    )
                                    (case_arm
                                      pat_list: [{(1)}]
                                      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 <--slave>)} 
                                                                  {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                                )
                                                              ]
                                                            )
                                                          left_token: <Left_CommandSub '$('>
                                                          spids: [422 438]
                                                        )
                                                      }
                                                    ]
                                                  )
                                                }
                                              spids: [419]
                                            )
                                          ]
                                          spids: [419]
                                        )
                                      ]
                                      spids: [415 416 443 16777215]
                                    )
                                    (case_arm
                                      pat_list: [{(3)}]
                                      action: [(C {(_installed_alternatives)})]
                                      spids: [446 447 453 16777215]
                                    )
                                  ]
                                  spids: [389 400 456]
                                )
                              ]
                              spids: [385 386 16777215 459]
                            )
                          ]
                          spids: [345 349 459]
                        )
                      ]
                      spids: [341 342 462 16777215]
                    )
                    (case_arm
                      pat_list: [{(--remove)} {(--set)}]
                      action: [
                        (Case
                          to_match: {($ VSub_Name '$args')}
                          arms: [
                            (case_arm
                              pat_list: [{(1)}]
                              action: [(C {(_installed_alternatives)})]
                              spids: [478 479 485 16777215]
                            )
                            (case_arm
                              pat_list: [{(2)}]
                              action: [(C {(_filedir)})]
                              spids: [488 489 495 16777215]
                            )
                          ]
                          spids: [471 475 498]
                        )
                      ]
                      spids: [465 468 501 16777215]
                    )
                    (case_arm
                      pat_list: [{(--auto)} {(--remove-all)} {(--display)} {(--config)}]
                      action: [(C {(_installed_alternatives)})]
                      spids: [504 511 517 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 {(compgen)} {(-W)} 
                                                  {
                                                    (SQ <'--verbose --quiet --help --version\n'> 
                                                      <
'                --altdir --admindir --install --remove --auto --display\n'
                                                      > <'                --config --set'>
                                                    )
                                                  } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [527 545]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [524]
                            )
                          ]
                          spids: [524]
                        )
                      ]
                      spids: [520 521 16777215 550]
                    )
                  ]
                  spids: [334 338 550]
                )
              ]
              spids: [158]
            )
          spids: [154 157]
        )
        (C {(complete)} {(-F)} {(_update_alternatives)} {(update-alternatives)} {(alternatives)})
      ]
      op_id: Op_DAmp
    )
  ]
)