Is is code a form of AST rewrite rules for optimization? This operation still looks like a incomprehensible wall of code 40 years later (I looked in the past inside the C++ compiler).