(CommandList
  children: [
    (AndOr
      children: [
        (FuncDef
          name: _mtx
          body: 
            (BraceGroup
              children: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:cur) op:Equal spids:[16])
                    (assign_pair lhs:(LhsName name:prev) op:Equal spids:[18])
                    (assign_pair lhs:(LhsName name:words) op:Equal spids:[20])
                    (assign_pair lhs:(LhsName name:cword) op:Equal spids:[22])
                  ]
                  spids: [14]
                )
                (AndOr
                  children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)]
                  op_id: Op_DPipe
                )
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair lhs:(LhsName name:options) op:Equal spids:[35])
                    (assign_pair lhs:(LhsName name:tapes) op:Equal spids:[37])
                    (assign_pair lhs:(LhsName name:drives) op:Equal spids:[39])
                  ]
                  spids: [33]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:options)
                      op: Equal
                      rhs: 
                        {
                          (DQ ('-f nobarcode invert noattach --version inquiry noattach ') 
                            ('        inventory status load unload eepos first last next')
                          )
                        }
                      spids: [43]
                    )
                  ]
                  spids: [43]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:tapes)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (Pipeline
                                    children: [
                                      (SimpleCommand
                                        words: [{(mtx)} {(status)}]
                                        redirects: [
                                          (Redir
                                            op_id: Redir_Great
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                            spids: [58]
                                          )
                                        ]
                                      )
                                      (C {(awk)} 
                                        {(SQ <'/Storage Element [0-9]+:Full/ { printf "%s ", $3 }'>)}
                                      )
                                    ]
                                    negated: False
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [53 70]
                          )
                        }
                      spids: [52]
                    )
                  ]
                  spids: [52]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:tapes)
                      op: Equal
                      rhs: 
                        {
                          (BracedVarSub
                            token: <VSub_Name tapes>
                            suffix_op: 
                              (PatSub
                                pat: {(':Full')}
                                do_all: True
                                do_prefix: False
                                do_suffix: False
                              )
                            spids: [74 79]
                          )
                        }
                      spids: [73]
                    )
                  ]
                  spids: [73]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:drives)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (Pipeline
                                    children: [
                                      (SimpleCommand
                                        words: [{(mtx)} {(status)}]
                                        redirects: [
                                          (Redir
                                            op_id: Redir_Great
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                            spids: [89]
                                          )
                                        ]
                                      )
                                      (C {(awk)} 
                                        {
                                          (SQ 
                                            <
'/Data Transfer Element [0-9]+:(Full|Empty)/ { printf "%s ", $4 }'
                                            >
                                          )
                                        }
                                      )
                                    ]
                                    negated: False
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [84 101]
                          )
                        }
                      spids: [83]
                    )
                  ]
                  spids: [83]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:drives)
                      op: Equal
                      rhs: 
                        {
                          (BracedVarSub
                            token: <VSub_Name drives>
                            suffix_op: 
                              (PatSub
                                pat: {(':Full')}
                                do_all: True
                                do_prefix: False
                                do_suffix: False
                              )
                            spids: [105 110]
                          )
                        }
                      spids: [104]
                    )
                  ]
                  spids: [104]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:drives)
                      op: Equal
                      rhs: 
                        {
                          (BracedVarSub
                            token: <VSub_Name drives>
                            suffix_op: 
                              (PatSub
                                pat: {(':Empty')}
                                do_all: True
                                do_prefix: False
                                do_suffix: False
                              )
                            spids: [114 119]
                          )
                        }
                      spids: [113]
                    )
                  ]
                  spids: [113]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (DBracket
                              expr: 
                                (BoolBinary
                                  op_id: BoolBinary_gt
                                  left: {($ VSub_Name '$cword')}
                                  right: {(1)}
                                )
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (Case
                          to_match: {($ VSub_Name '$prev')}
                          arms: [
                            (case_arm
                              pat_list: [{(load)}]
                              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)} 
                                                          {(DQ ($ VSub_Name '$tapes'))} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [153 169]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [150]
                                    )
                                  ]
                                  spids: [150]
                                )
                              ]
                              spids: [146 147 174 16777215]
                            )
                            (case_arm
                              pat_list: [{(unload)} {(first)} {(last)} {(next)}]
                              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)} 
                                                          {(DQ ($ VSub_Name '$drives'))} {(--)} {(DQ ($ VSub_Name '$cur'))}
                                                        )
                                                      ]
                                                    )
                                                  left_token: <Left_CommandSub '$('>
                                                  spids: [190 206]
                                                )
                                              }
                                            ]
                                          )
                                        }
                                      spids: [187]
                                    )
                                  ]
                                  spids: [187]
                                )
                              ]
                              spids: [177 184 211 16777215]
                            )
                            (case_arm
                              pat_list: [{(-f)}]
                              action: [(C {(true)})]
                              spids: [214 215 221 16777215]
                            )
                            (case_arm
                              pat_list: [{(Lit_Other '*')}]
                              action: [(C {(true)})]
                              spids: [224 225 231 16777215]
                            )
                          ]
                          spids: [139 143 234]
                        )
                      ]
                      spids: [16777215 136]
                    )
                  ]
                  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)} {(DQ ($ VSub_Name '$options'))} {(--)} 
                                              {(DQ ($ VSub_Name '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [243 259]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [240]
                        )
                      ]
                      spids: [240]
                    )
                  ]
                  spids: [237 264]
                )
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
              spids: [11]
            )
          spids: [7 10]
        )
        (C {(complete)} {(-F)} {(_mtx)} {(mtx)})
      ]
      op_id: Op_DAmp
    )
  ]
)