(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _abook
      body: 
        (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.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_eq
                          left: {($ Id.VSub_DollarName '$cword')}
                          right: {<1>}
                        )
                      right: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: {(DQ ($ Id.VSub_DollarName '$cur'))}
                        )
                    )
                )
                (BraceGroup
                  children: [
                    (C {<compopt>} {<-o>} {<nospace>})
                    (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:[{(DQ <->)}])}
                          spids: [65]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$cur')}
              arms: [
                (case_arm
                  pat_list: [{<-> <Id.Lit_Star '*'>}]
                  action: [
                    (C {<_longopt>} {<abook>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [91 93 106 -1]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{<--informat>}]
                  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 '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} 
                                          {
                                            (DQ 
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (command.Pipeline
                                                    children: [
                                                      (C {($ Id.VSub_Number '$1')} {<--formats>})
                                                      (C {<sed>} {<-n>} {<-e>} 
                                                        {(SQ <'s/^'>) 
                                                          (single_quoted
                                                            left: <Id.Left_DollarSingleQuote '$\''>
                                                            tokens: [<Id.Char_OneChar '\\t'>]
                                                            multiline: F
                                                          ) (SQ <'\\([a-z]*\\).*/\\1/p'>)
                                                        } {<-e>} {(SQ <'/^$/q'>)}
                                                      )
                                                    ]
                                                    negated: F
                                                  )
                                              )
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [124]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [120 121 183 -1]
                )
                (case_arm
                  pat_list: [{<--outformat>}]
                  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 '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} 
                                          {
                                            (DQ 
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (command.Pipeline
                                                    children: [
                                                      (C {($ Id.VSub_Number '$1')} {<--formats>})
                                                      (C {<sed>} {<-n>} {<-e>} 
                                                        {(SQ <'/^$/,$s/^'>) 
                                                          (single_quoted
                                                            left: <Id.Left_DollarSingleQuote '$\''>
                                                            tokens: [<Id.Char_OneChar '\\t'>]
                                                            multiline: F
                                                          ) (SQ <'\\([a-z]*\\).*/\\1/p'>)
                                                        }
                                                      )
                                                    ]
                                                    negated: F
                                                  )
                                              )
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [190]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [186 187 243 -1]
                )
                (case_arm
                  pat_list: [{<--infile>}]
                  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 '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {<stdin>} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [250]
                        )
                      ]
                    )
                    (C {<_filedir>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [246 247 280 -1]
                )
                (case_arm
                  pat_list: [{<--outfile>}]
                  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 '$('>
                                      child: 
                                        (C {<compgen>} {<-W>} {<stdout>} {<-->} 
                                          {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [287]
                        )
                      ]
                    )
                    (C {<_filedir>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [283 284 317 -1]
                )
                (case_arm
                  pat_list: [{<--config>} {<--datafile>}]
                  action: [
                    (C {<_filedir>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [320 323 334 -1]
                )
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_abook>} {<abook>})
  ]
)