libil port for in pure C