(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _ypmatch
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cur spids:[13])
                  op: Equal
                  spids: [13]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:prev spids:[15])
                  op: Equal
                  spids: [15]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:words spids:[17])
                  op: Equal
                  spids: [17]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cword spids:[19])
                  op: Equal
                  spids: [19]
                )
              ]
              spids: [11]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:map spids:[32])
                  op: Equal
                  spids: [32]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cmd spids:[34])
                  op: Equal
                  rhs: 
                    {
                      (word_part.BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (suffix_op.StringUnary
                            op_id: VOp1_DPound
                            arg_word: {('*') (Lit_Slash /)}
                          )
                        spids: [35 40]
                      )
                    }
                  spids: [34]
                )
              ]
              spids: [30]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.BoolBinary
                          op_id: BoolBinary_GlobDEqual
                          left: {($ VSub_DollarName '$cmd')}
                          right: {(ypcat)}
                        )
                      right: 
                        (bool_expr.BoolBinary
                          op_id: BoolBinary_gt
                          left: {($ VSub_DollarName '$cword')}
                          right: {(1)}
                        )
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.BoolBinary
                          op_id: BoolBinary_GlobDEqual
                          left: {($ VSub_DollarName '$cmd')}
                          right: {(ypmatch)}
                        )
                      right: 
                        (bool_expr.BoolBinary
                          op_id: BoolBinary_gt
                          left: {($ VSub_DollarName '$cword')}
                          right: {(2)}
                        )
                    )
                )
                (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalAnd
                              left: 
                                (bool_expr.BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {($ VSub_DollarName '$cmd')}
                                  right: {(ypmatch)}
                                )
                              right: 
                                (bool_expr.LogicalAnd
                                  left: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_eq
                                      left: {($ VSub_DollarName '$cword')}
                                      right: {(1)}
                                    )
                                  right: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_eq
                                      left: 
                                        {
                                          (word_part.BracedVarSub
                                            token: <VSub_Name words>
                                            prefix_op: VSub_Pound
                                            bracket_op: (bracket_op.WholeArray op_id:Lit_At)
                                            spids: [115 121]
                                          )
                                        }
                                      right: {(3)}
                                    )
                                )
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:map spids:[133])
                          op: Equal
                          rhs: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name words>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.ArithWord w:{(Lit_Digits 2)})
                                  )
                                spids: [134 139]
                              )
                            }
                          spids: [133]
                        )
                      ]
                      spids: [133]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[142])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} 
                                              {
                                                (SQ <'$( ypcat $map 2>/dev/null | \\\n'> 
                                                  <'            cut -d'>
                                                ) (Lit_Other ':') (SQ <' -f 1 )'>)
                                              } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [145 166]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [142]
                        )
                      ]
                      spids: [142]
                    )
                  ]
                  spids: [16777215 130]
                )
              ]
              else_action: [
                (command.AndOr
                  ops: [Op_DAmp]
                  children: [
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalAnd
                          left: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$cmd')}
                              right: {(ypmatch)}
                            )
                          right: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_ne
                              left: {($ VSub_DollarName '$cword')}
                              right: {(2)}
                            )
                        )
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(0)}
                    )
                  ]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[199])
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(compgen)} {(-W)} 
                                          {
                                            (SQ <'$( printf "%s\\n" $(ypcat -x 2>/dev/null | \\\n'> 
                                              <'                cut -d"\\"" -f 2) )'>
                                            )
                                          } {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [202 221]
                                )
                              }
                            ]
                          )
                        }
                      spids: [199]
                    )
                  ]
                  spids: [199]
                )
              ]
              spids: [171 226]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [8]
        )
      spids: [4 7]
    )
    (C {(complete)} {(-F)} {(_ypmatch)} {(ypmatch)} {(ypcat)})
  ]
)