HASM: pattern-matching enhancement