function match_gen

[edit]
static NODE * match_gen(NODE *node1, NODE *node2)