(CommandList
  children: [
    (AndOr
      children: [
        (FuncDef
          name: _pkgtool
          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
                )
                (Case
                  to_match: {(DQ ($ VSub_Name '$prev'))}
                  arms: [
                    (case_arm
                      pat_list: [{(--source_dir)} {(--target_dir)}]
                      action: [
                        (C {(_filedir)} {(-d)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [39 42 55 16777215]
                    )
                    (case_arm
                      pat_list: [{(--sets)}]
                      action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})]
                      spids: [58 59 71 16777215]
                    )
                    (case_arm
                      pat_list: [{(--source_device)}]
                      action: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:COMPREPLY)
                              op: Equal
                              rhs: 
                                {
                                  (ArrayLiteralPart
                                    words: [
                                      {
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (C {(compgen)} {(-f)} {(-d)} {(--)} 
                                                  {
                                                    (DQ 
                                                      (BracedVarSub
                                                        token: <VSub_Name cur>
                                                        suffix_op: 
                                                          (StringUnary
                                                            op_id: VTest_ColonHyphen
                                                            arg_word: 
                                                              {(Lit_Slash /) (dev) (Lit_Slash /)}
                                                          )
                                                        spids: [92 98]
                                                      )
                                                    )
                                                  }
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [81 101]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [78]
                            )
                          ]
                          spids: [78]
                        )
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [74 75 111 16777215]
                    )
                    (case_arm
                      pat_list: [{(--tagfile)}]
                      action: [
                        (C {(_filedir)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [114 115 126 16777215]
                    )
                  ]
                  spids: [30 36 129]
                )
                (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 <'--sets --ignore-tagfiles --tagfile\n'> 
                                                      <
'            --source-mounted --source_dir --target_dir --source_device'
                                                      >
                                                    )
                                                  } {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [155 174]
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [152]
                            )
                          ]
                          spids: [152]
                        )
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                      spids: [16777215 149]
                    )
                  ]
                  spids: [16777215 184]
                )
              ]
              spids: [8]
            )
          spids: [4 7]
        )
        (C {(complete)} {(-F)} {(_pkgtool)} {(pkgtool)})
      ]
      op_id: Op_DAmp
    )
  ]
)