(Frontend) Reimplement main_entry_iterate