So it is almost-C code, intended for an interpreter? I would start by making it run as C code, and convert from there, but OTOH you have already made the conversion. I'll have a look at it.