;; Replaces sequence:
;; push de
;; push hl
;; pop de
;; pop hl

;; with
;; ex de, hl

OLEVEL: 1
OFLAG: 3

REPLACE {{
 push $1
 push $2
 pop $1
 pop $2
}}

IF {{
 (($1 == hl) && ($2 == de)) || (($1 == de) && ($2 == hl))
}}

WITH {{
 ex de, hl
}}