(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _ypmatch
      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>)
              ]
            )
            (C {<local>} {<map>} 
              {<Id.Lit_VarLike 'cmd='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPound arg_word:{<'*'> <Id.Lit_Slash />})
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_DollarName '$cmd')}
                          right: {<ypcat>}
                        )
                      right: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_gt
                          left: {($ Id.VSub_DollarName '$cword')}
                          right: {<1>}
                        )
                    )
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_DollarName '$cmd')}
                          right: {<ypmatch>}
                        )
                      right: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_gt
                          left: {($ Id.VSub_DollarName '$cword')}
                          right: {<2>}
                        )
                    )
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (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 '$cmd')}
                                  right: {<ypmatch>}
                                )
                              right: 
                                (bool_expr.LogicalAnd
                                  left: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_DollarName '$cword')}
                                      right: {<1>}
                                    )
                                  right: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: 
                                        {
                                          (braced_var_sub
                                            token: <Id.VSub_Name words>
                                            prefix_op: (Id.VSub_Pound)
                                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                          )
                                        }
                                      right: {<3>}
                                    )
                                )
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:map)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name words>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>})
                                  )
                              )
                            }
                          spids: [133]
                        )
                      ]
                    )
                    (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 <'$( ypcat $map 2>/dev/null | \\\n'> 
                                                  <'            cut -d'>
                                                ) <Id.Lit_Other ':'> (SQ <' -f 1 )'>)
                                              } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [142]
                        )
                      ]
                    )
                  ]
                  spids: [95 130]
                )
              ]
              else_action: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalAnd
                          left: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$cmd')}
                              right: {<ypmatch>}
                            )
                          right: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_ne
                              left: {($ Id.VSub_DollarName '$cword')}
                              right: {<2>}
                            )
                        )
                    )
                    (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 <'$( printf "%s\\n" $(ypcat -x 2>/dev/null | \\\n'> 
                                              <'                cut -d"\\"" -f 2) )'>
                                            )
                                          } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                )
                              }
                            ]
                          )
                        }
                      spids: [199]
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (C {<complete>} {<-F>} {<_ypmatch>} {<ypmatch>} {<ypcat>})
  ]
)