(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _querybts
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>} {<-s>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{<-B>} {<--bts>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {<compgen>} {<-W>} 
                                              {(DQ <'debian guug kde mandrake help'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [47]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [41 44 78 -1]
                )
                (case_arm
                  pat_list: [{<-u>} {<--ui>} {<--interface>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPREPLY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {<compgen>} {<-W>} {(DQ <'newt text gnome'>)} {<-->} 
                                              {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [89]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [81 86 118 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {($ Id.VSub_DollarName '$split')})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {<compgen>} {<-W>} 
                                      {
                                        (SQ <'-h --help -v --version -A --archive -B --bts -l\n'> 
                                          <
'        --ldap --no-ldap --proxy --http_proxy -s --source -w --web -u --ui\n'
                                          > <'        --interface \\\n'> 
                                          <
'        wnpp boot-floppies kernel bugs.debian.org cdimage.debian.org general\n'
                                          > <'        installation-reports listarchives lists.debian.org mirrors\n'> 
                                          <
'        nm.debian.org press project qa.debian.org release-notes\n'
                                          > <'        security.debian.org tech-ctte upgrade-reports www.debian.org'>
                                        )
                                      } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                            )
                          }
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (command.Simple
                                      words: [
                                        {<apt-cache>}
                                        {<pkgnames>}
                                        {<-->}
                                        {(DQ ($ Id.VSub_DollarName '$cur'))}
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '2>'>
                                          fd: 2
                                          arg_word: {</dev/null>}
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [135]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_querybts>} {<querybts>})
  ]
)