first cut at a C version of the possible inferiors code