(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _pdftotext
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [
                    {<-h>}
                    {<-help>}
                    {<--help>}
                    {<-> (SQ <'?'>)}
                    {<-f>}
                    {<-l>}
                    {<-r>}
                    {<-x>}
                    {<-y>}
                    {<-W>}
                    {<-H>}
                    {<-fixed>}
                    {<-opw>}
                    {<-upw>}
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)]
                  spids: [37 67 73 -1]
                )
                (case_arm
                  pat_list: [{<-enc>}]
                  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>} 
                                              {
                                                (SQ <'$( "$1" -listenc 2>/dev/null |\n'> 
                                                  <'                sed -e 1d )'>
                                                )
                                              } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [80]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [76 77 108 -1]
                )
                (case_arm
                  pat_list: [{<-eol>}]
                  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 <'unix dos mac'>)} {<-->} 
                                              {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [115]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [111 112 142 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalAnd
                              left: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$cur')}
                                  right: {<-> <Id.Lit_Other '*'>}
                                )
                              right: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name prev>
                                        suffix_op: (suffix_op.Unary op_id:Id.VOp1_DComma arg_word:{})
                                      )
                                    }
                                  right: {<Id.Lit_Other '*'> <.pdf>}
                                )
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  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>} {(SQ <'$( _parse_help "$1" )'>)} {<-->} 
                                              {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [178]
                        )
                      ]
                    )
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [149 175]
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (braced_var_sub
                    token: <Id.VSub_Name prev>
                    suffix_op: (suffix_op.Unary op_id:Id.VOp1_DComma arg_word:{})
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{<->} {<Id.Lit_Star '*'> <.txt>}]
                  spids: [219 223 225 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'> <.pdf>}]
                  action: [
                    (command.Sentence
                      child: 
                        (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 <->)} {<-->} 
                                                  {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                )
                                              ]
                                            )
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [232]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (C {<_filedir>} {<txt>})
                  ]
                  spids: [228 230 261 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [(C {<_filedir>} {<pdf>})]
                  spids: [264 265 271 -1]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_pdftotext>} {<pdftotext>})
  ]
)